<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE GADTs #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Module      :  Text.Printf</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Copyright   :  (c) Lennart Augustsson and Bart Massey 2013</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE in this distribution)</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  Bart Massey &lt;bart@cs.pdx.edu&gt;</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- A C @printf(3)@-like formatter. This version has been</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- extended by Bart Massey as per the recommendations of</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- John Meacham and Simon Marlow</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- &lt;http://comments.gmane.org/gmane.comp.lang.haskell.libraries/4726&gt;</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- to support extensible formatting for new datatypes.  It</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- has also been extended to support almost all C</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- @printf(3)@ syntax.</span><span>
</span><span id="line-22"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Text.Printf</span><span class="hs-special">(</span><span>
</span><span id="line-25"></span><span class="annot"><span class="hs-comment">-- * Printing Functions</span></span><span>
</span><span id="line-26"></span><span>   </span><span class="annot"><a href="Text.Printf.html#printf"><span class="hs-identifier">printf</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#hPrintf"><span class="hs-identifier">hPrintf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span class="annot"><span class="hs-comment">-- * Extending To New Types</span></span><span>
</span><span id="line-28"></span><span class="hs-comment">--</span><span>
</span><span id="line-29"></span><span class="hs-comment">-- | This 'printf' can be extended to format types</span><span>
</span><span id="line-30"></span><span class="hs-comment">-- other than those provided for by default. This</span><span>
</span><span id="line-31"></span><span class="hs-comment">-- is done by instantiating 'PrintfArg' and providing</span><span>
</span><span id="line-32"></span><span class="hs-comment">-- a 'formatArg' for the type. It is possible to</span><span>
</span><span id="line-33"></span><span class="hs-comment">-- provide a 'parseFormat' to process type-specific</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- modifiers, but the default instance is usually</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- the best choice.</span><span>
</span><span id="line-36"></span><span class="hs-comment">--</span><span>
</span><span id="line-37"></span><span class="hs-comment">-- For example:</span><span>
</span><span id="line-38"></span><span class="hs-comment">--</span><span>
</span><span id="line-39"></span><span class="hs-comment">-- &gt; instance PrintfArg () where</span><span>
</span><span id="line-40"></span><span class="hs-comment">-- &gt;   formatArg x fmt | fmtChar (vFmt 'U' fmt) == 'U' =</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- &gt;     formatString &quot;()&quot; (fmt { fmtChar = 's', fmtPrecision = Nothing })</span><span>
</span><span id="line-42"></span><span class="hs-comment">-- &gt;   formatArg _ fmt = errorBadFormat $ fmtChar fmt</span><span>
</span><span id="line-43"></span><span class="hs-comment">-- &gt;</span><span>
</span><span id="line-44"></span><span class="hs-comment">-- &gt; main :: IO ()</span><span>
</span><span id="line-45"></span><span class="hs-comment">-- &gt; main = printf &quot;[%-3.1U]\n&quot; ()</span><span>
</span><span id="line-46"></span><span class="hs-comment">--</span><span>
</span><span id="line-47"></span><span class="hs-comment">-- prints \&quot;@[() ]@\&quot;. Note the use of 'formatString' to</span><span>
</span><span id="line-48"></span><span class="hs-comment">-- take care of field formatting specifications in a convenient</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- way.</span><span>
</span><span id="line-50"></span><span>   </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier">PrintfArg</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-51"></span><span>   </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier">FieldFormatter</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>   </span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier">FieldFormat</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>   </span><span class="annot"><a href="Text.Printf.html#FormatAdjustment"><span class="hs-identifier">FormatAdjustment</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#FormatSign"><span class="hs-identifier">FormatSign</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>   </span><span class="annot"><a href="Text.Printf.html#vFmt"><span class="hs-identifier">vFmt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span class="annot"><span class="hs-comment">-- ** Handling Type-specific Modifiers</span></span><span>
</span><span id="line-56"></span><span class="hs-comment">--</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- | In the unlikely case that modifier characters of</span><span>
</span><span id="line-58"></span><span class="hs-comment">-- some kind are desirable for a user-provided type,</span><span>
</span><span id="line-59"></span><span class="hs-comment">-- a 'ModifierParser' can be provided to process these</span><span>
</span><span id="line-60"></span><span class="hs-comment">-- characters. The resulting modifiers will appear in</span><span>
</span><span id="line-61"></span><span class="hs-comment">-- the 'FieldFormat' for use by the type-specific formatter.</span><span>
</span><span id="line-62"></span><span>   </span><span class="annot"><a href="Text.Printf.html#ModifierParser"><span class="hs-identifier">ModifierParser</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier">FormatParse</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span class="annot"><span class="hs-comment">-- ** Standard Formatters</span></span><span>
</span><span id="line-64"></span><span class="hs-comment">--</span><span>
</span><span id="line-65"></span><span class="hs-comment">-- | These formatters for standard types are provided for</span><span>
</span><span id="line-66"></span><span class="hs-comment">-- convenience in writting new type-specific formatters:</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- a common pattern is to throw to 'formatString' or</span><span>
</span><span id="line-68"></span><span class="hs-comment">-- 'formatInteger' to do most of the format handling for</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- a new type.</span><span>
</span><span id="line-70"></span><span>   </span><span class="annot"><a href="Text.Printf.html#formatString"><span class="hs-identifier">formatString</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#formatChar"><span class="hs-identifier">formatChar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#formatInt"><span class="hs-identifier">formatInt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-71"></span><span>   </span><span class="annot"><a href="Text.Printf.html#formatInteger"><span class="hs-identifier">formatInteger</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#formatRealFloat"><span class="hs-identifier">formatRealFloat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-72"></span><span class="annot"><span class="hs-comment">-- ** Raising Errors</span></span><span>
</span><span id="line-73"></span><span class="hs-comment">--</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- | These functions are used internally to raise various</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- errors, and are exported for use by new type-specific</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- formatters.</span><span>
</span><span id="line-77"></span><span>  </span><span class="annot"><a href="Text.Printf.html#errorBadFormat"><span class="hs-identifier">errorBadFormat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#errorShortFormat"><span class="hs-identifier">errorShortFormat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier">errorMissingArgument</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-78"></span><span>  </span><span class="annot"><a href="Text.Printf.html#errorBadArgument"><span class="hs-identifier">errorBadArgument</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-79"></span><span>  </span><span class="annot"><a href="Text.Printf.html#perror"><span class="hs-identifier">perror</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-80"></span><span class="annot"><span class="hs-comment">-- * Implementation Internals</span></span><span>
</span><span id="line-81"></span><span class="hs-comment">-- | These types are needed for implementing processing</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- variable numbers of arguments to 'printf' and 'hPrintf'.</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- Their implementation is intentionally not visible from</span><span>
</span><span id="line-84"></span><span class="hs-comment">-- this module. If you attempt to pass an argument of a type</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- which is not an instance of the appropriate class to</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- 'printf' or 'hPrintf', then the compiler will report it</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- as a missing instance of 'PrintfArg'.  (All 'PrintfArg'</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- instances are 'PrintfType' instances.)</span><span>
</span><span id="line-89"></span><span>  </span><span class="annot"><a href="Text.Printf.html#PrintfType"><span class="hs-identifier">PrintfType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#HPrintfType"><span class="hs-identifier">HPrintfType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- | This class is needed as a Haskell98 compatibility</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- workaround for the lack of FlexibleInstances.</span><span>
</span><span id="line-92"></span><span>  </span><span class="annot"><a href="Text.Printf.html#IsChar"><span class="hs-identifier">IsChar</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Char.html"><span class="hs-identifier">Data.Char</span></a></span><span>
</span><span id="line-96"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Int.html"><span class="hs-identifier">Data.Int</span></a></span><span>
</span><span id="line-97"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.List.html"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.OldList.html#stripPrefix"><span class="hs-identifier">stripPrefix</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Word.html"><span class="hs-identifier">Data.Word</span></a></span><span>
</span><span id="line-99"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Numeric.html"><span class="hs-identifier">Numeric</span></a></span><span>
</span><span id="line-100"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Numeric.Natural.html"><span class="hs-identifier">Numeric.Natural</span></a></span><span>
</span><span id="line-101"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.IO.html"><span class="hs-identifier">System.IO</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="hs-comment">-------------------</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">-- | Format a variable number of arguments with the C-style formatting string.</span><span>
</span><span id="line-106"></span><span class="hs-comment">--</span><span>
</span><span id="line-107"></span><span class="hs-comment">-- &gt;&gt;&gt; printf &quot;%s, %d, %.4f&quot; &quot;hello&quot; 123 pi</span><span>
</span><span id="line-108"></span><span class="hs-comment">-- hello, 123, 3.1416</span><span>
</span><span id="line-109"></span><span class="hs-comment">--</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- The return value is either 'String' or @('IO' a)@ (which</span><span>
</span><span id="line-111"></span><span class="hs-comment">-- should be @('IO' ())@, but Haskell's type system</span><span>
</span><span id="line-112"></span><span class="hs-comment">-- makes this hard).</span><span>
</span><span id="line-113"></span><span class="hs-comment">--</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- The format string consists of ordinary characters and</span><span>
</span><span id="line-115"></span><span class="hs-comment">-- /conversion specifications/, which specify how to format</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- one of the arguments to 'printf' in the output string. A</span><span>
</span><span id="line-117"></span><span class="hs-comment">-- format specification is introduced by the @%@ character;</span><span>
</span><span id="line-118"></span><span class="hs-comment">-- this character can be self-escaped into the format string</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- using @%%@. A format specification ends with a</span><span>
</span><span id="line-120"></span><span class="hs-comment">-- /format character/ that provides the primary information about</span><span>
</span><span id="line-121"></span><span class="hs-comment">-- how to format the value. The rest of the conversion</span><span>
</span><span id="line-122"></span><span class="hs-comment">-- specification is optional.  In order, one may have flag</span><span>
</span><span id="line-123"></span><span class="hs-comment">-- characters, a width specifier, a precision specifier, and</span><span>
</span><span id="line-124"></span><span class="hs-comment">-- type-specific modifier characters.</span><span>
</span><span id="line-125"></span><span class="hs-comment">--</span><span>
</span><span id="line-126"></span><span class="hs-comment">-- Unlike C @printf(3)@, the formatting of this 'printf'</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- is driven by the argument type; formatting is type specific. The</span><span>
</span><span id="line-128"></span><span class="hs-comment">-- types formatted by 'printf' \&quot;out of the box\&quot; are:</span><span>
</span><span id="line-129"></span><span class="hs-comment">--</span><span>
</span><span id="line-130"></span><span class="hs-comment">--   * 'Integral' types, including 'Char'</span><span>
</span><span id="line-131"></span><span class="hs-comment">--</span><span>
</span><span id="line-132"></span><span class="hs-comment">--   * 'String'</span><span>
</span><span id="line-133"></span><span class="hs-comment">--</span><span>
</span><span id="line-134"></span><span class="hs-comment">--   * 'RealFloat' types</span><span>
</span><span id="line-135"></span><span class="hs-comment">--</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- 'printf' is also extensible to support other types: see below.</span><span>
</span><span id="line-137"></span><span class="hs-comment">--</span><span>
</span><span id="line-138"></span><span class="hs-comment">-- A conversion specification begins with the</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- character @%@, followed by zero or more of the following flags:</span><span>
</span><span id="line-140"></span><span class="hs-comment">--</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- &gt; -      left adjust (default is right adjust)</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- &gt; +      always use a sign (+ or -) for signed conversions</span><span>
</span><span id="line-143"></span><span class="hs-comment">-- &gt; space  leading space for positive numbers in signed conversions</span><span>
</span><span id="line-144"></span><span class="hs-comment">-- &gt; 0      pad with zeros rather than spaces</span><span>
</span><span id="line-145"></span><span class="hs-comment">-- &gt; #      use an \&quot;alternate form\&quot;: see below</span><span>
</span><span id="line-146"></span><span class="hs-comment">--</span><span>
</span><span id="line-147"></span><span class="hs-comment">-- When both flags are given, @-@ overrides @0@ and @+@ overrides space.</span><span>
</span><span id="line-148"></span><span class="hs-comment">-- A negative width specifier in a @*@ conversion is treated as</span><span>
</span><span id="line-149"></span><span class="hs-comment">-- positive but implies the left adjust flag.</span><span>
</span><span id="line-150"></span><span class="hs-comment">--</span><span>
</span><span id="line-151"></span><span class="hs-comment">-- The \&quot;alternate form\&quot; for unsigned radix conversions is</span><span>
</span><span id="line-152"></span><span class="hs-comment">-- as in C @printf(3)@:</span><span>
</span><span id="line-153"></span><span class="hs-comment">--</span><span>
</span><span id="line-154"></span><span class="hs-comment">-- &gt; %o           prefix with a leading 0 if needed</span><span>
</span><span id="line-155"></span><span class="hs-comment">-- &gt; %x           prefix with a leading 0x if nonzero</span><span>
</span><span id="line-156"></span><span class="hs-comment">-- &gt; %X           prefix with a leading 0X if nonzero</span><span>
</span><span id="line-157"></span><span class="hs-comment">-- &gt; %b           prefix with a leading 0b if nonzero</span><span>
</span><span id="line-158"></span><span class="hs-comment">-- &gt; %[eEfFgG]    ensure that the number contains a decimal point</span><span>
</span><span id="line-159"></span><span class="hs-comment">--</span><span>
</span><span id="line-160"></span><span class="hs-comment">-- Any flags are followed optionally by a field width:</span><span>
</span><span id="line-161"></span><span class="hs-comment">--</span><span>
</span><span id="line-162"></span><span class="hs-comment">-- &gt; num    field width</span><span>
</span><span id="line-163"></span><span class="hs-comment">-- &gt; *      as num, but taken from argument list</span><span>
</span><span id="line-164"></span><span class="hs-comment">--</span><span>
</span><span id="line-165"></span><span class="hs-comment">-- The field width is a minimum, not a maximum: it will be</span><span>
</span><span id="line-166"></span><span class="hs-comment">-- expanded as needed to avoid mutilating a value.</span><span>
</span><span id="line-167"></span><span class="hs-comment">--</span><span>
</span><span id="line-168"></span><span class="hs-comment">-- Any field width is followed optionally by a precision:</span><span>
</span><span id="line-169"></span><span class="hs-comment">--</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- &gt; .num   precision</span><span>
</span><span id="line-171"></span><span class="hs-comment">-- &gt; .      same as .0</span><span>
</span><span id="line-172"></span><span class="hs-comment">-- &gt; .*     as num, but taken from argument list</span><span>
</span><span id="line-173"></span><span class="hs-comment">--</span><span>
</span><span id="line-174"></span><span class="hs-comment">-- Negative precision is taken as 0. The meaning of the</span><span>
</span><span id="line-175"></span><span class="hs-comment">-- precision depends on the conversion type.</span><span>
</span><span id="line-176"></span><span class="hs-comment">--</span><span>
</span><span id="line-177"></span><span class="hs-comment">-- &gt; Integral    minimum number of digits to show</span><span>
</span><span id="line-178"></span><span class="hs-comment">-- &gt; RealFloat   number of digits after the decimal point</span><span>
</span><span id="line-179"></span><span class="hs-comment">-- &gt; String      maximum number of characters</span><span>
</span><span id="line-180"></span><span class="hs-comment">--</span><span>
</span><span id="line-181"></span><span class="hs-comment">-- The precision for Integral types is accomplished by zero-padding.</span><span>
</span><span id="line-182"></span><span class="hs-comment">-- If both precision and zero-pad are given for an Integral field,</span><span>
</span><span id="line-183"></span><span class="hs-comment">-- the zero-pad is ignored.</span><span>
</span><span id="line-184"></span><span class="hs-comment">--</span><span>
</span><span id="line-185"></span><span class="hs-comment">-- Any precision is followed optionally for Integral types</span><span>
</span><span id="line-186"></span><span class="hs-comment">-- by a width modifier; the only use of this modifier being</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- to set the implicit size of the operand for conversion of</span><span>
</span><span id="line-188"></span><span class="hs-comment">-- a negative operand to unsigned:</span><span>
</span><span id="line-189"></span><span class="hs-comment">--</span><span>
</span><span id="line-190"></span><span class="hs-comment">-- &gt; hh     Int8</span><span>
</span><span id="line-191"></span><span class="hs-comment">-- &gt; h      Int16</span><span>
</span><span id="line-192"></span><span class="hs-comment">-- &gt; l      Int32</span><span>
</span><span id="line-193"></span><span class="hs-comment">-- &gt; ll     Int64</span><span>
</span><span id="line-194"></span><span class="hs-comment">-- &gt; L      Int64</span><span>
</span><span id="line-195"></span><span class="hs-comment">--</span><span>
</span><span id="line-196"></span><span class="hs-comment">-- The specification ends with a format character:</span><span>
</span><span id="line-197"></span><span class="hs-comment">--</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- &gt; c      character               Integral</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- &gt; d      decimal                 Integral</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- &gt; o      octal                   Integral</span><span>
</span><span id="line-201"></span><span class="hs-comment">-- &gt; x      hexadecimal             Integral</span><span>
</span><span id="line-202"></span><span class="hs-comment">-- &gt; X      hexadecimal             Integral</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- &gt; b      binary                  Integral</span><span>
</span><span id="line-204"></span><span class="hs-comment">-- &gt; u      unsigned decimal        Integral</span><span>
</span><span id="line-205"></span><span class="hs-comment">-- &gt; f      floating point          RealFloat</span><span>
</span><span id="line-206"></span><span class="hs-comment">-- &gt; F      floating point          RealFloat</span><span>
</span><span id="line-207"></span><span class="hs-comment">-- &gt; g      general format float    RealFloat</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- &gt; G      general format float    RealFloat</span><span>
</span><span id="line-209"></span><span class="hs-comment">-- &gt; e      exponent format float   RealFloat</span><span>
</span><span id="line-210"></span><span class="hs-comment">-- &gt; E      exponent format float   RealFloat</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- &gt; s      string                  String</span><span>
</span><span id="line-212"></span><span class="hs-comment">-- &gt; v      default format          any type</span><span>
</span><span id="line-213"></span><span class="hs-comment">--</span><span>
</span><span id="line-214"></span><span class="hs-comment">-- The \&quot;%v\&quot; specifier is provided for all built-in types,</span><span>
</span><span id="line-215"></span><span class="hs-comment">-- and should be provided for user-defined type formatters</span><span>
</span><span id="line-216"></span><span class="hs-comment">-- as well. It picks a \&quot;best\&quot; representation for the given</span><span>
</span><span id="line-217"></span><span class="hs-comment">-- type. For the built-in types the \&quot;%v\&quot; specifier is</span><span>
</span><span id="line-218"></span><span class="hs-comment">-- converted as follows:</span><span>
</span><span id="line-219"></span><span class="hs-comment">--</span><span>
</span><span id="line-220"></span><span class="hs-comment">-- &gt; c      Char</span><span>
</span><span id="line-221"></span><span class="hs-comment">-- &gt; u      other unsigned Integral</span><span>
</span><span id="line-222"></span><span class="hs-comment">-- &gt; d      other signed Integral</span><span>
</span><span id="line-223"></span><span class="hs-comment">-- &gt; g      RealFloat</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- &gt; s      String</span><span>
</span><span id="line-225"></span><span class="hs-comment">--</span><span>
</span><span id="line-226"></span><span class="hs-comment">-- Mismatch between the argument types and the format</span><span>
</span><span id="line-227"></span><span class="hs-comment">-- string, as well as any other syntactic or semantic errors</span><span>
</span><span id="line-228"></span><span class="hs-comment">-- in the format string, will cause an exception to be</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- thrown at runtime.</span><span>
</span><span id="line-230"></span><span class="hs-comment">--</span><span>
</span><span id="line-231"></span><span class="hs-comment">-- Note that the formatting for 'RealFloat' types is</span><span>
</span><span id="line-232"></span><span class="hs-comment">-- currently a bit different from that of C @printf(3)@,</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- conforming instead to 'Numeric.showEFloat',</span><span>
</span><span id="line-234"></span><span class="hs-comment">-- 'Numeric.showFFloat' and 'Numeric.showGFloat' (and their</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- alternate versions 'Numeric.showFFloatAlt' and</span><span>
</span><span id="line-236"></span><span class="hs-comment">-- 'Numeric.showGFloatAlt'). This is hard to fix: the fixed</span><span>
</span><span id="line-237"></span><span class="hs-comment">-- versions would format in a backward-incompatible way.</span><span>
</span><span id="line-238"></span><span class="hs-comment">-- In any case the Haskell behavior is generally more</span><span>
</span><span id="line-239"></span><span class="hs-comment">-- sensible than the C behavior.  A brief summary of some</span><span>
</span><span id="line-240"></span><span class="hs-comment">-- key differences:</span><span>
</span><span id="line-241"></span><span class="hs-comment">--</span><span>
</span><span id="line-242"></span><span class="hs-comment">-- * Haskell 'printf' never uses the default \&quot;6-digit\&quot; precision</span><span>
</span><span id="line-243"></span><span class="hs-comment">--   used by C printf.</span><span>
</span><span id="line-244"></span><span class="hs-comment">--</span><span>
</span><span id="line-245"></span><span class="hs-comment">-- * Haskell 'printf' treats the \&quot;precision\&quot; specifier as</span><span>
</span><span id="line-246"></span><span class="hs-comment">--   indicating the number of digits after the decimal point.</span><span>
</span><span id="line-247"></span><span class="hs-comment">--</span><span>
</span><span id="line-248"></span><span class="hs-comment">-- * Haskell 'printf' prints the exponent of e-format</span><span>
</span><span id="line-249"></span><span class="hs-comment">--   numbers without a gratuitous plus sign, and with the</span><span>
</span><span id="line-250"></span><span class="hs-comment">--   minimum possible number of digits.</span><span>
</span><span id="line-251"></span><span class="hs-comment">--</span><span>
</span><span id="line-252"></span><span class="hs-comment">-- * Haskell 'printf' will place a zero after a decimal point when</span><span>
</span><span id="line-253"></span><span class="hs-comment">--   possible.</span><span>
</span><span id="line-254"></span><span id="local-6989586621679563813"><span class="annot"><a href="Text.Printf.html#printf"><span class="hs-identifier hs-type">printf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#PrintfType"><span class="hs-identifier hs-type">PrintfType</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563813"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563813"><span class="hs-identifier hs-type">r</span></a></span></span><span>
</span><span id="line-255"></span><span id="printf"><span class="annot"><span class="annottext">printf :: forall r. PrintfType r =&gt; String -&gt; r
</span><a href="Text.Printf.html#printf"><span class="hs-identifier hs-var hs-var">printf</span></a></span></span><span> </span><span id="local-6989586621679563607"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563607"><span class="hs-identifier hs-var">fmts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; r
forall t. PrintfType t =&gt; String -&gt; [UPrintf] -&gt; t
</span><a href="Text.Printf.html#spr"><span class="hs-identifier hs-var">spr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563607"><span class="hs-identifier hs-var">fmts</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span class="hs-comment">-- | Similar to 'printf', except that output is via the specified</span><span>
</span><span id="line-258"></span><span class="hs-comment">-- 'Handle'.  The return type is restricted to @('IO' a)@.</span><span>
</span><span id="line-259"></span><span id="local-6989586621679563808"><span class="annot"><a href="Text.Printf.html#hPrintf"><span class="hs-identifier hs-type">hPrintf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#HPrintfType"><span class="hs-identifier hs-type">HPrintfType</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563808"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563808"><span class="hs-identifier hs-type">r</span></a></span></span><span>
</span><span id="line-260"></span><span id="hPrintf"><span class="annot"><span class="annottext">hPrintf :: forall r. HPrintfType r =&gt; Handle -&gt; String -&gt; r
</span><a href="Text.Printf.html#hPrintf"><span class="hs-identifier hs-var hs-var">hPrintf</span></a></span></span><span> </span><span id="local-6989586621679563603"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679563603"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621679563602"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563602"><span class="hs-identifier hs-var">fmts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; [UPrintf] -&gt; r
forall t. HPrintfType t =&gt; Handle -&gt; String -&gt; [UPrintf] -&gt; t
</span><a href="Text.Printf.html#hspr"><span class="hs-identifier hs-var">hspr</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679563603"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563602"><span class="hs-identifier hs-var">fmts</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="hs-comment">-- |The 'PrintfType' class provides the variable argument magic for</span><span>
</span><span id="line-263"></span><span class="hs-comment">-- 'printf'.  Its implementation is intentionally not visible from</span><span>
</span><span id="line-264"></span><span class="hs-comment">-- this module. If you attempt to pass an argument of a type which</span><span>
</span><span id="line-265"></span><span class="hs-comment">-- is not an instance of this class to 'printf' or 'hPrintf', then</span><span>
</span><span id="line-266"></span><span class="hs-comment">-- the compiler will report it as a missing instance of 'PrintfArg'.</span><span>
</span><span id="line-267"></span><span class="hs-keyword">class</span><span> </span><span id="PrintfType"><span class="annot"><a href="Text.Printf.html#PrintfType"><span class="hs-identifier hs-var">PrintfType</span></a></span></span><span> </span><span id="local-6989586621679563809"><span class="annot"><a href="#local-6989586621679563809"><span class="hs-identifier hs-type">t</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-268"></span><span>    </span><span id="spr"><span class="annot"><a href="Text.Printf.html#spr"><span class="hs-identifier hs-type">spr</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563809"><span class="hs-identifier hs-type">t</span></a></span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span class="hs-comment">-- | The 'HPrintfType' class provides the variable argument magic for</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- 'hPrintf'.  Its implementation is intentionally not visible from</span><span>
</span><span id="line-272"></span><span class="hs-comment">-- this module.</span><span>
</span><span id="line-273"></span><span class="hs-keyword">class</span><span> </span><span id="HPrintfType"><span class="annot"><a href="Text.Printf.html#HPrintfType"><span class="hs-identifier hs-var">HPrintfType</span></a></span></span><span> </span><span id="local-6989586621679563804"><span class="annot"><a href="#local-6989586621679563804"><span class="hs-identifier hs-type">t</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-274"></span><span>    </span><span id="hspr"><span class="annot"><a href="Text.Printf.html#hspr"><span class="hs-identifier hs-type">hspr</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563804"><span class="hs-identifier hs-type">t</span></a></span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span class="hs-comment">{- not allowed in Haskell 2010
instance PrintfType String where
    spr fmt args = uprintf fmt (reverse args)
-}</span><span>
</span><span id="line-280"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-281"></span><span id="local-6989586621679563802"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#IsChar"><span class="hs-identifier hs-type">IsChar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563802"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfType"><span class="hs-identifier hs-type">PrintfType</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679563802"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-282"></span><span>    </span><span id="local-6989586621679563595"><span class="annot"><span class="annottext">spr :: String -&gt; [UPrintf] -&gt; [c]
</span><a href="#local-6989586621679563595"><span class="hs-identifier hs-var hs-var hs-var hs-var">spr</span></a></span></span><span> </span><span id="local-6989586621679563594"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563594"><span class="hs-identifier hs-var">fmts</span></a></span></span><span> </span><span id="local-6989586621679563593"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563593"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; c) -&gt; String -&gt; [c]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; c
forall c. IsChar c =&gt; Char -&gt; c
</span><a href="Text.Printf.html#fromChar"><span class="hs-identifier hs-var">fromChar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; String
</span><a href="Text.Printf.html#uprintf"><span class="hs-identifier hs-var">uprintf</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563594"><span class="hs-identifier hs-var">fmts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[UPrintf] -&gt; [UPrintf]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563593"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="hs-comment">-- Note that this should really be (IO ()), but GHC's</span><span>
</span><span id="line-285"></span><span class="hs-comment">-- type system won't readily let us say that without</span><span>
</span><span id="line-286"></span><span class="hs-comment">-- bringing the GADTs. So we go conditional for these defs.</span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-289"></span><span id="local-6989586621679563796"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679563796"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#~"><span class="hs-operator hs-type">~</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfType"><span class="hs-identifier hs-type">PrintfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563796"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-290"></span><span>    </span><span id="local-6989586621679563584"><span class="annot"><span class="annottext">spr :: String -&gt; [UPrintf] -&gt; IO a
</span><a href="#local-6989586621679563584"><span class="hs-identifier hs-var hs-var hs-var hs-var">spr</span></a></span></span><span> </span><span id="local-6989586621679563583"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563583"><span class="hs-identifier hs-var">fmts</span></a></span></span><span> </span><span id="local-6989586621679563582"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563582"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-291"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="System.IO.html#putStr"><span class="hs-identifier hs-var">putStr</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
forall c. IsChar c =&gt; Char -&gt; c
</span><a href="Text.Printf.html#fromChar"><span class="hs-identifier hs-var">fromChar</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; String
</span><a href="Text.Printf.html#uprintf"><span class="hs-identifier hs-var">uprintf</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563583"><span class="hs-identifier hs-var">fmts</span></a></span><span> </span><span class="annot"><span class="annottext">([UPrintf] -&gt; String) -&gt; [UPrintf] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf] -&gt; [UPrintf]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563582"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-294"></span><span id="local-6989586621679563791"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679563791"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#~"><span class="hs-operator hs-type">~</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#HPrintfType"><span class="hs-identifier hs-type">HPrintfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563791"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-295"></span><span>    </span><span id="local-6989586621679563575"><span class="annot"><span class="annottext">hspr :: Handle -&gt; String -&gt; [UPrintf] -&gt; IO a
</span><a href="#local-6989586621679563575"><span class="hs-identifier hs-var hs-var hs-var hs-var">hspr</span></a></span></span><span> </span><span id="local-6989586621679563574"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679563574"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621679563573"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563573"><span class="hs-identifier hs-var">fmts</span></a></span></span><span> </span><span id="local-6989586621679563572"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563572"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-296"></span><span>        </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; IO ()
</span><a href="GHC.IO.Handle.Text.html#hPutStr"><span class="hs-identifier hs-var">hPutStr</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679563574"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; String
</span><a href="Text.Printf.html#uprintf"><span class="hs-identifier hs-var">uprintf</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563573"><span class="hs-identifier hs-var">fmts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[UPrintf] -&gt; [UPrintf]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563572"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-299"></span><span id="local-6989586621679563787"><span id="local-6989586621679563788"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563788"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfType"><span class="hs-identifier hs-type">PrintfType</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563787"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfType"><span class="hs-identifier hs-type">PrintfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679563788"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563787"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-300"></span><span>    </span><span id="local-6989586621679563563"><span class="annot"><span class="annottext">spr :: String -&gt; [UPrintf] -&gt; a -&gt; r
</span><a href="#local-6989586621679563563"><span class="hs-identifier hs-var hs-var hs-var hs-var">spr</span></a></span></span><span> </span><span id="local-6989586621679563562"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563562"><span class="hs-identifier hs-var">fmts</span></a></span></span><span> </span><span id="local-6989586621679563561"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563561"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679563560"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563560"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; r
forall t. PrintfType t =&gt; String -&gt; [UPrintf] -&gt; t
</span><a href="Text.Printf.html#spr"><span class="hs-identifier hs-var">spr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563562"><span class="hs-identifier hs-var">fmts</span></a></span><span>
</span><span id="line-301"></span><span>                             </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; ModifierParser
forall a. PrintfArg a =&gt; a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseFormat"><span class="hs-identifier hs-var">parseFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563560"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a -&gt; FieldFormatter
forall a. PrintfArg a =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatArg"><span class="hs-identifier hs-var">formatArg</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563560"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">UPrintf -&gt; [UPrintf] -&gt; [UPrintf]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563561"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-304"></span><span id="local-6989586621679563780"><span id="local-6989586621679563781"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563781"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#HPrintfType"><span class="hs-identifier hs-type">HPrintfType</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563780"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#HPrintfType"><span class="hs-identifier hs-type">HPrintfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679563781"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563780"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-305"></span><span>    </span><span id="local-6989586621679563550"><span class="annot"><span class="annottext">hspr :: Handle -&gt; String -&gt; [UPrintf] -&gt; a -&gt; r
</span><a href="#local-6989586621679563550"><span class="hs-identifier hs-var hs-var hs-var hs-var">hspr</span></a></span></span><span> </span><span id="local-6989586621679563549"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679563549"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621679563548"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563548"><span class="hs-identifier hs-var">fmts</span></a></span></span><span> </span><span id="local-6989586621679563547"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563547"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679563546"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563546"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; [UPrintf] -&gt; r
forall t. HPrintfType t =&gt; Handle -&gt; String -&gt; [UPrintf] -&gt; t
</span><a href="Text.Printf.html#hspr"><span class="hs-identifier hs-var">hspr</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679563549"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563548"><span class="hs-identifier hs-var">fmts</span></a></span><span>
</span><span id="line-306"></span><span>                                  </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; ModifierParser
forall a. PrintfArg a =&gt; a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseFormat"><span class="hs-identifier hs-var">parseFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563546"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a -&gt; FieldFormatter
forall a. PrintfArg a =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatArg"><span class="hs-identifier hs-var">formatArg</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563546"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">UPrintf -&gt; [UPrintf] -&gt; [UPrintf]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563547"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span class="hs-comment">-- | Typeclass of 'printf'-formattable values. The 'formatArg' method</span><span>
</span><span id="line-309"></span><span class="hs-comment">-- takes a value and a field format descriptor and either fails due</span><span>
</span><span id="line-310"></span><span class="hs-comment">-- to a bad descriptor or produces a 'ShowS' as the result. The</span><span>
</span><span id="line-311"></span><span class="hs-comment">-- default 'parseFormat' expects no modifiers: this is the normal</span><span>
</span><span id="line-312"></span><span class="hs-comment">-- case. Minimal instance: 'formatArg'.</span><span>
</span><span id="line-313"></span><span class="hs-keyword">class</span><span> </span><span id="PrintfArg"><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-var">PrintfArg</span></a></span></span><span> </span><span id="local-6989586621679563785"><span class="annot"><a href="#local-6989586621679563785"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-314"></span><span>    </span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-315"></span><span>    </span><span id="formatArg"><span class="annot"><a href="Text.Printf.html#formatArg"><span class="hs-identifier hs-type">formatArg</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679563785"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-type">FieldFormatter</span></a></span><span>
</span><span id="line-316"></span><span>    </span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-317"></span><span>    </span><span id="parseFormat"><span class="annot"><a href="Text.Printf.html#parseFormat"><span class="hs-identifier hs-type">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679563785"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#ModifierParser"><span class="hs-identifier hs-type">ModifierParser</span></a></span><span>
</span><span id="line-318"></span><span>    </span><span id="local-6989586621679563544"><span class="annot"><a href="Text.Printf.html#parseFormat"><span class="hs-identifier hs-var hs-var">parseFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563543"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563543"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563542"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563542"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char -&gt; ModifierParser
</span><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-var">FormatParse</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563543"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563542"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-319"></span><span>    </span><span class="annot"><a href="Text.Printf.html#parseFormat"><span class="hs-identifier hs-var">parseFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FormatParse
forall a. a
</span><a href="Text.Printf.html#errorShortFormat"><span class="hs-identifier hs-var">errorShortFormat</span></a></span></span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-322"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-323"></span><span>    </span><span id="local-6989586621679563536"><span class="annot"><span class="annottext">formatArg :: Char -&gt; FieldFormatter
</span><a href="#local-6989586621679563536"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatChar"><span class="hs-identifier hs-var">formatChar</span></a></span><span>
</span><span id="line-324"></span><span>    </span><span id="local-6989586621679563533"><span class="annot"><span class="annottext">parseFormat :: Char -&gt; ModifierParser
</span><a href="#local-6989586621679563533"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679563532"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563532"><span class="hs-identifier hs-var">cf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
forall a. HasCallStack =&gt; a
</span><a href="GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563532"><span class="hs-identifier hs-var">cf</span></a></span><span>
</span><span id="line-325"></span><span>
</span><span id="line-326"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-327"></span><span id="local-6989586621679563773"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679563527"><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#IsChar"><span class="hs-identifier hs-type">IsChar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563773"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679563773"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">]</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-328"></span><span>    </span><span id="local-6989586621679563525"><span class="annot"><span class="annottext">formatArg :: [c] -&gt; FieldFormatter
</span><a href="#local-6989586621679563525"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[c] -&gt; FieldFormatter
forall c. IsChar c =&gt; [c] -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatString"><span class="hs-identifier hs-var">formatString</span></a></span></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-331"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-332"></span><span>    </span><span id="local-6989586621679563518"><span class="annot"><span class="annottext">formatArg :: Int -&gt; FieldFormatter
</span><a href="#local-6989586621679563518"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-333"></span><span>    </span><span id="local-6989586621679563517"><span class="annot"><span class="annottext">parseFormat :: Int -&gt; ModifierParser
</span><a href="#local-6989586621679563517"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-334"></span><span>
</span><span id="line-335"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-336"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="GHC.Int.html#Int8"><span class="hs-identifier hs-type">Int8</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-337"></span><span>    </span><span id="local-6989586621679563511"><span class="annot"><span class="annottext">formatArg :: Int8 -&gt; FieldFormatter
</span><a href="#local-6989586621679563511"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int8 -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-338"></span><span>    </span><span id="local-6989586621679563510"><span class="annot"><span class="annottext">parseFormat :: Int8 -&gt; ModifierParser
</span><a href="#local-6989586621679563510"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int8 -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-341"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="GHC.Int.html#Int16"><span class="hs-identifier hs-type">Int16</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-342"></span><span>    </span><span id="local-6989586621679563504"><span class="annot"><span class="annottext">formatArg :: Int16 -&gt; FieldFormatter
</span><a href="#local-6989586621679563504"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int16 -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-343"></span><span>    </span><span id="local-6989586621679563503"><span class="annot"><span class="annottext">parseFormat :: Int16 -&gt; ModifierParser
</span><a href="#local-6989586621679563503"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int16 -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-346"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="GHC.Int.html#Int32"><span class="hs-identifier hs-type">Int32</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-347"></span><span>    </span><span id="local-6989586621679563497"><span class="annot"><span class="annottext">formatArg :: Int32 -&gt; FieldFormatter
</span><a href="#local-6989586621679563497"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int32 -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-348"></span><span>    </span><span id="local-6989586621679563496"><span class="annot"><span class="annottext">parseFormat :: Int32 -&gt; ModifierParser
</span><a href="#local-6989586621679563496"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int32 -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-351"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-352"></span><span>    </span><span id="local-6989586621679563490"><span class="annot"><span class="annottext">formatArg :: Int64 -&gt; FieldFormatter
</span><a href="#local-6989586621679563490"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-353"></span><span>    </span><span id="local-6989586621679563489"><span class="annot"><span class="annottext">parseFormat :: Int64 -&gt; ModifierParser
</span><a href="#local-6989586621679563489"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-354"></span><span>
</span><span id="line-355"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-356"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-357"></span><span>    </span><span id="local-6989586621679563481"><span class="annot"><span class="annottext">formatArg :: Word -&gt; FieldFormatter
</span><a href="#local-6989586621679563481"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-358"></span><span>    </span><span id="local-6989586621679563480"><span class="annot"><span class="annottext">parseFormat :: Word -&gt; ModifierParser
</span><a href="#local-6989586621679563480"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-361"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-362"></span><span>    </span><span id="local-6989586621679563472"><span class="annot"><span class="annottext">formatArg :: Word8 -&gt; FieldFormatter
</span><a href="#local-6989586621679563472"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-363"></span><span>    </span><span id="local-6989586621679563471"><span class="annot"><span class="annottext">parseFormat :: Word8 -&gt; ModifierParser
</span><a href="#local-6989586621679563471"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-364"></span><span>
</span><span id="line-365"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-366"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-367"></span><span>    </span><span id="local-6989586621679563463"><span class="annot"><span class="annottext">formatArg :: Word16 -&gt; FieldFormatter
</span><a href="#local-6989586621679563463"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-368"></span><span>    </span><span id="local-6989586621679563462"><span class="annot"><span class="annottext">parseFormat :: Word16 -&gt; ModifierParser
</span><a href="#local-6989586621679563462"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-371"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-372"></span><span>    </span><span id="local-6989586621679563454"><span class="annot"><span class="annottext">formatArg :: Word32 -&gt; FieldFormatter
</span><a href="#local-6989586621679563454"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-373"></span><span>    </span><span id="local-6989586621679563453"><span class="annot"><span class="annottext">parseFormat :: Word32 -&gt; ModifierParser
</span><a href="#local-6989586621679563453"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-376"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-377"></span><span>    </span><span id="local-6989586621679563445"><span class="annot"><span class="annottext">formatArg :: Word64 -&gt; FieldFormatter
</span><a href="#local-6989586621679563445"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; FieldFormatter
forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var">formatInt</span></a></span><span>
</span><span id="line-378"></span><span>    </span><span id="local-6989586621679563444"><span class="annot"><span class="annottext">parseFormat :: Word64 -&gt; ModifierParser
</span><a href="#local-6989586621679563444"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-381"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-382"></span><span>    </span><span id="local-6989586621679563440"><span class="annot"><span class="annottext">formatArg :: Integer -&gt; FieldFormatter
</span><a href="#local-6989586621679563440"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInteger"><span class="hs-identifier hs-var">formatInteger</span></a></span><span>
</span><span id="line-383"></span><span>    </span><span id="local-6989586621679563439"><span class="annot"><span class="annottext">parseFormat :: Integer -&gt; ModifierParser
</span><a href="#local-6989586621679563439"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-386"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-387"></span><span>    </span><span id="local-6989586621679563433"><span class="annot"><span class="annottext">formatArg :: Natural -&gt; FieldFormatter
</span><a href="#local-6989586621679563433"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInteger"><span class="hs-identifier hs-var">formatInteger</span></a></span><span> </span><span class="annot"><span class="annottext">(Integer -&gt; FieldFormatter)
-&gt; (Natural -&gt; Integer) -&gt; Natural -&gt; FieldFormatter
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span>
</span><span id="line-388"></span><span>    </span><span id="local-6989586621679563431"><span class="annot"><span class="annottext">parseFormat :: Natural -&gt; ModifierParser
</span><a href="#local-6989586621679563431"><span class="hs-identifier hs-var hs-var hs-var hs-var">parseFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; ModifierParser
forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var">parseIntFormat</span></a></span><span>
</span><span id="line-389"></span><span>
</span><span id="line-390"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-391"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679563428"><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-392"></span><span>    </span><span id="local-6989586621679563425"><span class="annot"><span class="annottext">formatArg :: Float -&gt; FieldFormatter
</span><a href="#local-6989586621679563425"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; FieldFormatter
forall a. RealFloat a =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatRealFloat"><span class="hs-identifier hs-var">formatRealFloat</span></a></span><span>
</span><span id="line-393"></span><span>
</span><span id="line-394"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-395"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679563422"><span class="annot"><a href="Text.Printf.html#PrintfArg"><span class="hs-identifier hs-type">PrintfArg</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-396"></span><span>    </span><span id="local-6989586621679563419"><span class="annot"><span class="annottext">formatArg :: Double -&gt; FieldFormatter
</span><a href="#local-6989586621679563419"><span class="hs-identifier hs-var hs-var hs-var hs-var">formatArg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double -&gt; FieldFormatter
forall a. RealFloat a =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatRealFloat"><span class="hs-identifier hs-var">formatRealFloat</span></a></span><span>
</span><span id="line-397"></span><span>
</span><span id="line-398"></span><span class="hs-comment">-- | This class, with only the one instance, is used as</span><span>
</span><span id="line-399"></span><span class="hs-comment">-- a workaround for the fact that 'String', as a concrete</span><span>
</span><span id="line-400"></span><span class="hs-comment">-- type, is not allowable as a typeclass instance. 'IsChar'</span><span>
</span><span id="line-401"></span><span class="hs-comment">-- is exported for backward-compatibility.</span><span>
</span><span id="line-402"></span><span class="hs-keyword">class</span><span> </span><span id="IsChar"><span class="annot"><a href="Text.Printf.html#IsChar"><span class="hs-identifier hs-var">IsChar</span></a></span></span><span> </span><span id="local-6989586621679563799"><span class="annot"><a href="#local-6989586621679563799"><span class="hs-identifier hs-type">c</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-403"></span><span>    </span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-404"></span><span>    </span><span id="toChar"><span class="annot"><a href="Text.Printf.html#toChar"><span class="hs-identifier hs-type">toChar</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679563799"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-405"></span><span>    </span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-406"></span><span>    </span><span id="fromChar"><span class="annot"><a href="Text.Printf.html#fromChar"><span class="hs-identifier hs-type">fromChar</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563799"><span class="hs-identifier hs-type">c</span></a></span><span>
</span><span id="line-407"></span><span>
</span><span id="line-408"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-409"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Text.Printf.html#IsChar"><span class="hs-identifier hs-type">IsChar</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-410"></span><span>    </span><span id="local-6989586621679563414"><span class="annot"><span class="annottext">toChar :: Char -&gt; Char
</span><a href="#local-6989586621679563414"><span class="hs-identifier hs-var hs-var hs-var hs-var">toChar</span></a></span></span><span> </span><span id="local-6989586621679563413"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563413"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563413"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-411"></span><span>    </span><span id="local-6989586621679563412"><span class="annot"><span class="annottext">fromChar :: Char -&gt; Char
</span><a href="#local-6989586621679563412"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromChar</span></a></span></span><span> </span><span id="local-6989586621679563411"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563411"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563411"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-412"></span><span>
</span><span id="line-413"></span><span class="hs-comment">-------------------</span><span>
</span><span id="line-414"></span><span>
</span><span id="line-415"></span><span class="hs-comment">-- | Whether to left-adjust or zero-pad a field. These are</span><span>
</span><span id="line-416"></span><span class="hs-comment">-- mutually exclusive, with 'LeftAdjust' taking precedence.</span><span>
</span><span id="line-417"></span><span class="hs-comment">--</span><span>
</span><span id="line-418"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-419"></span><span class="hs-keyword">data</span><span> </span><span id="FormatAdjustment"><span class="annot"><a href="Text.Printf.html#FormatAdjustment"><span class="hs-identifier hs-var">FormatAdjustment</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LeftAdjust"><span class="annot"><a href="Text.Printf.html#LeftAdjust"><span class="hs-identifier hs-var">LeftAdjust</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="ZeroPad"><span class="annot"><a href="Text.Printf.html#ZeroPad"><span class="hs-identifier hs-var">ZeroPad</span></a></span></span><span>
</span><span id="line-420"></span><span>
</span><span id="line-421"></span><span class="hs-comment">-- | How to handle the sign of a numeric field.  These are</span><span>
</span><span id="line-422"></span><span class="hs-comment">-- mutually exclusive, with 'SignPlus' taking precedence.</span><span>
</span><span id="line-423"></span><span class="hs-comment">--</span><span>
</span><span id="line-424"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-425"></span><span class="hs-keyword">data</span><span> </span><span id="FormatSign"><span class="annot"><a href="Text.Printf.html#FormatSign"><span class="hs-identifier hs-var">FormatSign</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="SignPlus"><span class="annot"><a href="Text.Printf.html#SignPlus"><span class="hs-identifier hs-var">SignPlus</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="SignSpace"><span class="annot"><a href="Text.Printf.html#SignSpace"><span class="hs-identifier hs-var">SignSpace</span></a></span></span><span>
</span><span id="line-426"></span><span>
</span><span id="line-427"></span><span class="hs-comment">-- | Description of field formatting for 'formatArg'. See UNIX @printf(3)@</span><span>
</span><span id="line-428"></span><span class="hs-comment">-- for a description of how field formatting works.</span><span>
</span><span id="line-429"></span><span class="hs-comment">--</span><span>
</span><span id="line-430"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-431"></span><span class="hs-keyword">data</span><span> </span><span id="FieldFormat"><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-var">FieldFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="FieldFormat"><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-var">FieldFormat</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-432"></span><span>  </span><span id="fmtWidth"><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Int
</span><a href="Text.Printf.html#fmtWidth"><span class="hs-identifier hs-var hs-var">fmtWidth</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">,</span><span>       </span><span class="hs-comment">-- ^ Total width of the field.</span><span>
</span><span id="line-433"></span><span>  </span><span id="fmtPrecision"><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var hs-var">fmtPrecision</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- ^ Secondary field width specifier.</span><span>
</span><span id="line-434"></span><span>  </span><span id="fmtAdjust"><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var hs-var">fmtAdjust</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Text.Printf.html#FormatAdjustment"><span class="hs-identifier hs-type">FormatAdjustment</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- ^ Kind of filling or padding</span><span>
</span><span id="line-435"></span><span>                                        </span><span class="hs-comment">--   to be done.</span><span>
</span><span id="line-436"></span><span>  </span><span id="fmtSign"><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe FormatSign
</span><a href="Text.Printf.html#fmtSign"><span class="hs-identifier hs-var hs-var">fmtSign</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Text.Printf.html#FormatSign"><span class="hs-identifier hs-type">FormatSign</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- ^ Whether to insist on a</span><span>
</span><span id="line-437"></span><span>                               </span><span class="hs-comment">-- plus sign for positive</span><span>
</span><span id="line-438"></span><span>                               </span><span class="hs-comment">-- numbers.</span><span>
</span><span id="line-439"></span><span>  </span><span id="fmtAlternate"><span class="annot"><span class="annottext">FieldFormat -&gt; Bool
</span><a href="Text.Printf.html#fmtAlternate"><span class="hs-identifier hs-var hs-var">fmtAlternate</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">,</span><span>        </span><span class="hs-comment">-- ^ Indicates an &quot;alternate</span><span>
</span><span id="line-440"></span><span>                               </span><span class="hs-comment">-- format&quot;.  See @printf(3)@</span><span>
</span><span id="line-441"></span><span>                               </span><span class="hs-comment">-- for the details, which</span><span>
</span><span id="line-442"></span><span>                               </span><span class="hs-comment">-- vary by argument spec.</span><span>
</span><span id="line-443"></span><span>  </span><span id="fmtModifiers"><span class="annot"><span class="annottext">FieldFormat -&gt; String
</span><a href="Text.Printf.html#fmtModifiers"><span class="hs-identifier hs-var hs-var">fmtModifiers</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span>      </span><span class="hs-comment">-- ^ Characters that appeared</span><span>
</span><span id="line-444"></span><span>                               </span><span class="hs-comment">-- immediately to the left of</span><span>
</span><span id="line-445"></span><span>                               </span><span class="hs-comment">-- 'fmtChar' in the format</span><span>
</span><span id="line-446"></span><span>                               </span><span class="hs-comment">-- and were accepted by the</span><span>
</span><span id="line-447"></span><span>                               </span><span class="hs-comment">-- type's 'parseFormat'.</span><span>
</span><span id="line-448"></span><span>                               </span><span class="hs-comment">-- Normally the empty string.</span><span>
</span><span id="line-449"></span><span>  </span><span id="fmtChar"><span class="annot"><span class="annottext">FieldFormat -&gt; Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var hs-var">fmtChar</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>              </span><span class="hs-comment">-- ^ The format character</span><span>
</span><span id="line-450"></span><span>                               </span><span class="hs-comment">-- 'printf' was invoked</span><span>
</span><span id="line-451"></span><span>                               </span><span class="hs-comment">-- with. 'formatArg' should</span><span>
</span><span id="line-452"></span><span>                               </span><span class="hs-comment">-- fail unless this character</span><span>
</span><span id="line-453"></span><span>                               </span><span class="hs-comment">-- matches the type. It is</span><span>
</span><span id="line-454"></span><span>                               </span><span class="hs-comment">-- normal to handle many</span><span>
</span><span id="line-455"></span><span>                               </span><span class="hs-comment">-- different format</span><span>
</span><span id="line-456"></span><span>                               </span><span class="hs-comment">-- characters for a single</span><span>
</span><span id="line-457"></span><span>                               </span><span class="hs-comment">-- type.</span><span>
</span><span id="line-458"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-459"></span><span>
</span><span id="line-460"></span><span class="hs-comment">-- | The \&quot;format parser\&quot; walks over argument-type-specific</span><span>
</span><span id="line-461"></span><span class="hs-comment">-- modifier characters to find the primary format character.</span><span>
</span><span id="line-462"></span><span class="hs-comment">-- This is the type of its result.</span><span>
</span><span id="line-463"></span><span class="hs-comment">--</span><span>
</span><span id="line-464"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-465"></span><span class="hs-keyword">data</span><span> </span><span id="FormatParse"><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-var">FormatParse</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="FormatParse"><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-var">FormatParse</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-466"></span><span>  </span><span id="fpModifiers"><span class="annot"><span class="annottext">FormatParse -&gt; String
</span><a href="Text.Printf.html#fpModifiers"><span class="hs-identifier hs-var hs-var">fpModifiers</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- ^ Any modifiers found.</span><span>
</span><span id="line-467"></span><span>  </span><span id="fpChar"><span class="annot"><span class="annottext">FormatParse -&gt; Char
</span><a href="Text.Printf.html#fpChar"><span class="hs-identifier hs-var hs-var">fpChar</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">,</span><span>          </span><span class="hs-comment">-- ^ Primary format character.</span><span>
</span><span id="line-468"></span><span>  </span><span id="fpRest"><span class="annot"><span class="annottext">FormatParse -&gt; String
</span><a href="Text.Printf.html#fpRest"><span class="hs-identifier hs-var hs-var">fpRest</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>         </span><span class="hs-comment">-- ^ Rest of the format string.</span><span>
</span><span id="line-469"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-470"></span><span>
</span><span id="line-471"></span><span class="hs-comment">-- Contains the &quot;modifier letters&quot; that can precede an</span><span>
</span><span id="line-472"></span><span class="hs-comment">-- integer type.</span><span>
</span><span id="line-473"></span><span class="annot"><a href="Text.Printf.html#intModifierMap"><span class="hs-identifier hs-type">intModifierMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-474"></span><span id="intModifierMap"><span class="annot"><span class="annottext">intModifierMap :: [(String, Integer)]
</span><a href="Text.Printf.html#intModifierMap"><span class="hs-identifier hs-var hs-var">intModifierMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span>
</span><span id="line-475"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hh&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int8 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int8
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Int.html#Int8"><span class="hs-identifier hs-type">Int8</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-476"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;h&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int16 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int16
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Int.html#Int16"><span class="hs-identifier hs-type">Int16</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-477"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;l&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int32 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int32
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Int.html#Int32"><span class="hs-identifier hs-type">Int32</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-478"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ll&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-479"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;L&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-480"></span><span>
</span><span id="line-481"></span><span id="local-6989586621679563776"><span class="annot"><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-type">parseIntFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679563776"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-type">FormatParse</span></a></span></span><span>
</span><span id="line-482"></span><span id="parseIntFormat"><span class="annot"><span class="annottext">parseIntFormat :: forall a. a -&gt; ModifierParser
</span><a href="Text.Printf.html#parseIntFormat"><span class="hs-identifier hs-var hs-var">parseIntFormat</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679563386"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563386"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-483"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">((String, Integer) -&gt; Maybe FormatParse -&gt; Maybe FormatParse)
-&gt; Maybe FormatParse -&gt; [(String, Integer)] -&gt; Maybe FormatParse
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">(String, Integer) -&gt; Maybe FormatParse -&gt; Maybe FormatParse
</span><a href="#local-6989586621679563384"><span class="hs-identifier hs-var">matchPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FormatParse
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, Integer)]
</span><a href="Text.Printf.html#intModifierMap"><span class="hs-identifier hs-var">intModifierMap</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-484"></span><span>    </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563383"><span class="annot"><span class="annottext">FormatParse
</span><a href="#local-6989586621679563383"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatParse
</span><a href="#local-6989586621679563383"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-485"></span><span>    </span><span class="annot"><span class="annottext">Maybe FormatParse
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-486"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563386"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-487"></span><span>        </span><span id="local-6989586621679563382"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563382"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563381"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563381"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char -&gt; ModifierParser
</span><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-var">FormatParse</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563382"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563381"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-488"></span><span>        </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatParse
forall a. a
</span><a href="Text.Printf.html#errorShortFormat"><span class="hs-identifier hs-var">errorShortFormat</span></a></span><span>
</span><span id="line-489"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-490"></span><span>    </span><span id="local-6989586621679563384"><span class="annot"><span class="annottext">matchPrefix :: (String, Integer) -&gt; Maybe FormatParse -&gt; Maybe FormatParse
</span><a href="#local-6989586621679563384"><span class="hs-identifier hs-var hs-var">matchPrefix</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563380"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563380"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563379"><span class="annot"><span class="annottext">m :: Maybe FormatParse
</span><a href="#local-6989586621679563379"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-type">FormatParse</span></a></span><span> </span><span id="local-6989586621679563378"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563378"><span class="hs-identifier hs-var">p0</span></a></span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-491"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563378"><span class="hs-identifier hs-var">p0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563380"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatParse
</span><a href="#local-6989586621679563379"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-492"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe FormatParse
</span><a href="#local-6989586621679563376"><span class="hs-identifier hs-var">getFormat</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563380"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-493"></span><span>          </span><span class="annot"><span class="annottext">Maybe FormatParse
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe FormatParse
</span><a href="#local-6989586621679563379"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-494"></span><span>          </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563375"><span class="annot"><span class="annottext">FormatParse
</span><a href="#local-6989586621679563375"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatParse -&gt; Maybe FormatParse
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatParse
</span><a href="#local-6989586621679563375"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-495"></span><span>    </span><span class="annot"><a href="#local-6989586621679563384"><span class="hs-identifier hs-var">matchPrefix</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563374"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563374"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe FormatParse
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-496"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; Maybe FormatParse
</span><a href="#local-6989586621679563376"><span class="hs-identifier hs-var">getFormat</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563374"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-497"></span><span>    </span><span id="local-6989586621679563376"><span class="annot"><span class="annottext">getFormat :: String -&gt; Maybe FormatParse
</span><a href="#local-6989586621679563376"><span class="hs-identifier hs-var hs-var">getFormat</span></a></span></span><span> </span><span id="local-6989586621679563373"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563373"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-498"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Maybe String
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Maybe [a]
</span><a href="Data.OldList.html#stripPrefix"><span class="hs-identifier hs-var">stripPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563373"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563386"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; (String -&gt; Maybe FormatParse) -&gt; Maybe FormatParse
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe FormatParse
</span><a href="#local-6989586621679563372"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-499"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-500"></span><span>        </span><span id="local-6989586621679563372"><span class="annot"><span class="annottext">fp :: String -&gt; Maybe FormatParse
</span><a href="#local-6989586621679563372"><span class="hs-identifier hs-var hs-var">fp</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563371"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563371"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563370"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563370"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FormatParse -&gt; Maybe FormatParse
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(FormatParse -&gt; Maybe FormatParse)
-&gt; FormatParse -&gt; Maybe FormatParse
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Char -&gt; ModifierParser
</span><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-var">FormatParse</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563373"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563371"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563370"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-501"></span><span>        </span><span class="annot"><a href="#local-6989586621679563372"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatParse
forall a. a
</span><a href="Text.Printf.html#errorShortFormat"><span class="hs-identifier hs-var">errorShortFormat</span></a></span><span>
</span><span id="line-502"></span><span>
</span><span id="line-503"></span><span class="hs-comment">-- | This is the type of a field formatter reified over its</span><span>
</span><span id="line-504"></span><span class="hs-comment">-- argument.</span><span>
</span><span id="line-505"></span><span class="hs-comment">--</span><span>
</span><span id="line-506"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-507"></span><span class="hs-keyword">type</span><span> </span><span id="FieldFormatter"><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-var">FieldFormatter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span><span>
</span><span id="line-508"></span><span>
</span><span id="line-509"></span><span class="hs-comment">-- | Type of a function that will parse modifier characters</span><span>
</span><span id="line-510"></span><span class="hs-comment">-- from the format string.</span><span>
</span><span id="line-511"></span><span class="hs-comment">--</span><span>
</span><span id="line-512"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-513"></span><span class="hs-keyword">type</span><span> </span><span id="ModifierParser"><span class="annot"><a href="Text.Printf.html#ModifierParser"><span class="hs-identifier hs-var">ModifierParser</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-type">FormatParse</span></a></span><span>
</span><span id="line-514"></span><span>
</span><span id="line-515"></span><span class="hs-comment">-- | Substitute a \'v\' format character with the given</span><span>
</span><span id="line-516"></span><span class="hs-comment">-- default format character in the 'FieldFormat'. A</span><span>
</span><span id="line-517"></span><span class="hs-comment">-- convenience for user-implemented types, which should</span><span>
</span><span id="line-518"></span><span class="hs-comment">-- support \&quot;%v\&quot;.</span><span>
</span><span id="line-519"></span><span class="hs-comment">--</span><span>
</span><span id="line-520"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-521"></span><span class="annot"><a href="Text.Printf.html#vFmt"><span class="hs-identifier hs-type">vFmt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span>
</span><span id="line-522"></span><span id="vFmt"><span class="annot"><span class="annottext">vFmt :: Char -&gt; FieldFormat -&gt; FieldFormat
</span><a href="Text.Printf.html#vFmt"><span class="hs-identifier hs-var hs-var">vFmt</span></a></span></span><span> </span><span id="local-6989586621679563368"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563368"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679563367"><span class="annot"><span class="annottext">ufmt :: FieldFormat
</span><a href="#local-6989586621679563367"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">fmtChar :: FieldFormat -&gt; Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var">fmtChar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'v'</span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563367"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">fmtChar :: Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var">fmtChar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563368"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-523"></span><span class="annot"><a href="Text.Printf.html#vFmt"><span class="hs-identifier hs-var">vFmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679563366"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563366"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563366"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-524"></span><span>
</span><span id="line-525"></span><span class="hs-comment">-- | Formatter for 'Char' values.</span><span>
</span><span id="line-526"></span><span class="hs-comment">--</span><span>
</span><span id="line-527"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-528"></span><span class="annot"><a href="Text.Printf.html#formatChar"><span class="hs-identifier hs-type">formatChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-type">FieldFormatter</span></a></span><span>
</span><span id="line-529"></span><span id="formatChar"><span class="annot"><span class="annottext">formatChar :: Char -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatChar"><span class="hs-identifier hs-var hs-var">formatChar</span></a></span></span><span> </span><span id="local-6989586621679563365"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563365"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679563364"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563364"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-530"></span><span>  </span><span class="annot"><span class="annottext">Maybe Integer -&gt; Integer -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatIntegral"><span class="hs-identifier hs-var">formatIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Integer) -&gt; Int -&gt; Integer
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563365"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FieldFormatter -&gt; FieldFormatter
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; FieldFormat -&gt; FieldFormat
</span><a href="Text.Printf.html#vFmt"><span class="hs-identifier hs-var">vFmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'c'</span></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563364"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-531"></span><span>
</span><span id="line-532"></span><span class="hs-comment">-- | Formatter for 'String' values.</span><span>
</span><span id="line-533"></span><span class="hs-comment">--</span><span>
</span><span id="line-534"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-535"></span><span id="local-6989586621679563361"><span class="annot"><a href="Text.Printf.html#formatString"><span class="hs-identifier hs-type">formatString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Printf.html#IsChar"><span class="hs-identifier hs-type">IsChar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563361"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679563361"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-type">FieldFormatter</span></a></span></span><span>
</span><span id="line-536"></span><span id="formatString"><span class="annot"><span class="annottext">formatString :: forall c. IsChar c =&gt; [c] -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatString"><span class="hs-identifier hs-var hs-var">formatString</span></a></span></span><span> </span><span id="local-6989586621679563357"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679563357"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679563356"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563356"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-537"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var hs-var">fmtChar</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldFormat -&gt; Char) -&gt; FieldFormat -&gt; Char
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; FieldFormat -&gt; FieldFormat
</span><a href="Text.Printf.html#vFmt"><span class="hs-identifier hs-var">vFmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'s'</span></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563356"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-538"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'s'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
forall c. IsChar c =&gt; c -&gt; Char
</span><a href="Text.Printf.html#toChar"><span class="hs-identifier hs-var">toChar</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; (String -&gt; String) -&gt; String -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563356"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563354"><span class="hs-identifier hs-var">ts</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-539"></span><span>           </span><span class="hs-keyword">where</span><span>
</span><span id="line-540"></span><span>             </span><span id="local-6989586621679563354"><span class="annot"><span class="annottext">ts :: String
</span><a href="#local-6989586621679563354"><span class="hs-identifier hs-var hs-var">ts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Char) -&gt; [a] -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Char
forall c. IsChar c =&gt; c -&gt; Char
</span><a href="Text.Printf.html#toChar"><span class="hs-identifier hs-var">toChar</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; String) -&gt; [a] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; [a]
</span><a href="#local-6989586621679563353"><span class="hs-identifier hs-var">trunc</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Int -&gt; [a]) -&gt; Maybe Int -&gt; [a]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var hs-var">fmtPrecision</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563356"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-541"></span><span>               </span><span class="hs-keyword">where</span><span>
</span><span id="line-542"></span><span>                 </span><span id="local-6989586621679563353"><span class="annot"><span class="annottext">trunc :: Maybe Int -&gt; [a]
</span><a href="#local-6989586621679563353"><span class="hs-identifier hs-var hs-var">trunc</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679563357"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-543"></span><span>                 </span><span class="annot"><a href="#local-6989586621679563353"><span class="hs-identifier hs-var">trunc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563352"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563352"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; [a]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="GHC.List.html#take"><span class="hs-identifier hs-var">take</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563352"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679563357"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-544"></span><span>    </span><span id="local-6989586621679563350"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563350"><span class="hs-identifier hs-var">c</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. Char -&gt; a
</span><a href="Text.Printf.html#errorBadFormat"><span class="hs-identifier hs-var">errorBadFormat</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563350"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-545"></span><span>
</span><span id="line-546"></span><span class="hs-comment">-- Possibly apply the int modifiers to get a new</span><span>
</span><span id="line-547"></span><span class="hs-comment">-- int width for conversion.</span><span>
</span><span id="line-548"></span><span class="annot"><a href="Text.Printf.html#fixupMods"><span class="hs-identifier hs-type">fixupMods</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-549"></span><span id="fixupMods"><span class="annot"><span class="annottext">fixupMods :: FieldFormat -&gt; Maybe Integer -&gt; Maybe Integer
</span><a href="Text.Printf.html#fixupMods"><span class="hs-identifier hs-var hs-var">fixupMods</span></a></span></span><span> </span><span id="local-6989586621679563348"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563348"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span id="local-6989586621679563347"><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563347"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-550"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563346"><span class="annot"><span class="annottext">mods :: String
</span><a href="#local-6989586621679563346"><span class="hs-identifier hs-var hs-var">mods</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; String
</span><a href="Text.Printf.html#fmtModifiers"><span class="hs-identifier hs-var hs-var">fmtModifiers</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563348"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-551"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563346"><span class="hs-identifier hs-var">mods</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-552"></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563347"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-553"></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; [(String, Integer)] -&gt; Maybe Integer
forall a b. Eq a =&gt; a -&gt; [(a, b)] -&gt; Maybe b
</span><a href="GHC.List.html#lookup"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563346"><span class="hs-identifier hs-var">mods</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, Integer)]
</span><a href="Text.Printf.html#intModifierMap"><span class="hs-identifier hs-var">intModifierMap</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-554"></span><span>      </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563344"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563344"><span class="hs-identifier hs-var">m0</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563344"><span class="hs-identifier hs-var">m0</span></a></span><span>
</span><span id="line-555"></span><span>      </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe Integer
forall a. String -&gt; a
</span><a href="Text.Printf.html#perror"><span class="hs-identifier hs-var">perror</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unknown format modifier&quot;</span></span><span>
</span><span id="line-556"></span><span>
</span><span id="line-557"></span><span class="hs-comment">-- | Formatter for 'Int' values.</span><span>
</span><span id="line-558"></span><span class="hs-comment">--</span><span>
</span><span id="line-559"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-560"></span><span id="local-6989586621679563772"><span class="annot"><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-type">formatInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563772"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Enum.html#Bounded"><span class="hs-identifier hs-type">Bounded</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563772"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563772"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-type">FieldFormatter</span></a></span></span><span>
</span><span id="line-561"></span><span id="formatInt"><span class="annot"><span class="annottext">formatInt :: forall a. (Integral a, Bounded a) =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInt"><span class="hs-identifier hs-var hs-var">formatInt</span></a></span></span><span> </span><span id="local-6989586621679563336"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563336"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679563335"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563335"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-562"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563334"><span class="annot"><span class="annottext">lb :: Integer
</span><a href="#local-6989586621679563334"><span class="hs-identifier hs-var hs-var">lb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Integer) -&gt; a -&gt; Integer
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. a -&gt; a -&gt; a
</span><a href="GHC.Base.html#asTypeOf"><span class="hs-operator hs-var">`asTypeOf`</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563336"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-563"></span><span>      </span><span id="local-6989586621679563332"><span class="annot"><span class="annottext">m :: Maybe Integer
</span><a href="#local-6989586621679563332"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Integer -&gt; Maybe Integer
</span><a href="Text.Printf.html#fixupMods"><span class="hs-identifier hs-var">fixupMods</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563335"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563334"><span class="hs-identifier hs-var">lb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-564"></span><span>      </span><span id="local-6989586621679563331"><span class="annot"><span class="annottext">ufmt' :: FieldFormat
</span><a href="#local-6989586621679563331"><span class="hs-identifier hs-var hs-var">ufmt'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563334"><span class="hs-identifier hs-var">lb</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-565"></span><span>        </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; FieldFormat -&gt; FieldFormat
</span><a href="Text.Printf.html#vFmt"><span class="hs-identifier hs-var">vFmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'u'</span></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563335"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-566"></span><span>        </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563335"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-567"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-568"></span><span>  </span><span class="annot"><span class="annottext">Maybe Integer -&gt; Integer -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatIntegral"><span class="hs-identifier hs-var">formatIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563332"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563336"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563331"><span class="hs-identifier hs-var">ufmt'</span></a></span><span>
</span><span id="line-569"></span><span>
</span><span id="line-570"></span><span class="hs-comment">-- | Formatter for 'Integer' values.</span><span>
</span><span id="line-571"></span><span class="hs-comment">--</span><span>
</span><span id="line-572"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-573"></span><span class="annot"><a href="Text.Printf.html#formatInteger"><span class="hs-identifier hs-type">formatInteger</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-type">FieldFormatter</span></a></span><span>
</span><span id="line-574"></span><span id="formatInteger"><span class="annot"><span class="annottext">formatInteger :: Integer -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatInteger"><span class="hs-identifier hs-var hs-var">formatInteger</span></a></span></span><span> </span><span id="local-6989586621679563330"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563330"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679563329"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563329"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-575"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563328"><span class="annot"><span class="annottext">m :: Maybe Integer
</span><a href="#local-6989586621679563328"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Integer -&gt; Maybe Integer
</span><a href="Text.Printf.html#fixupMods"><span class="hs-identifier hs-var">fixupMods</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563329"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-576"></span><span>  </span><span class="annot"><span class="annottext">Maybe Integer -&gt; Integer -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatIntegral"><span class="hs-identifier hs-var">formatIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563328"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563330"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563329"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-577"></span><span>
</span><span id="line-578"></span><span class="hs-comment">-- All formatting for integral types is handled</span><span>
</span><span id="line-579"></span><span class="hs-comment">-- consistently.  The only difference is between Integer and</span><span>
</span><span id="line-580"></span><span class="hs-comment">-- bounded types; this difference is handled by the 'm'</span><span>
</span><span id="line-581"></span><span class="hs-comment">-- argument containing the lower bound.</span><span>
</span><span id="line-582"></span><span class="annot"><a href="Text.Printf.html#formatIntegral"><span class="hs-identifier hs-type">formatIntegral</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-type">FieldFormatter</span></a></span><span>
</span><span id="line-583"></span><span id="formatIntegral"><span class="annot"><span class="annottext">formatIntegral :: Maybe Integer -&gt; Integer -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatIntegral"><span class="hs-identifier hs-var hs-var">formatIntegral</span></a></span></span><span> </span><span id="local-6989586621679563327"><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563327"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679563326"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679563325"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563325"><span class="hs-identifier hs-var">ufmt0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-584"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563324"><span class="annot"><span class="annottext">prec :: Maybe Int
</span><a href="#local-6989586621679563324"><span class="hs-identifier hs-var hs-var">prec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var hs-var">fmtPrecision</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563325"><span class="hs-identifier hs-var">ufmt0</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-585"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var hs-var">fmtChar</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-586"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'d'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Int -&gt; Integer -&gt; (String, String)
</span><a href="Text.Printf.html#fmti"><span class="hs-identifier hs-var">fmti</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563324"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-587"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'i'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Int -&gt; Integer -&gt; (String, String)
</span><a href="Text.Printf.html#fmti"><span class="hs-identifier hs-var">fmti</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563324"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-588"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'x'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
-&gt; Maybe String
-&gt; Maybe Int
-&gt; Maybe Integer
-&gt; Integer
-&gt; (String, String)
</span><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-var">fmtu</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">16</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563319"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0x&quot;</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563324"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563327"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-589"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'X'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(String, String) -&gt; (String, String)
forall {a}. (a, String) -&gt; (a, String)
</span><a href="#local-6989586621679563318"><span class="hs-identifier hs-var">upcase</span></a></span><span> </span><span class="annot"><span class="annottext">((String, String) -&gt; (String, String))
-&gt; (String, String) -&gt; (String, String)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
-&gt; Maybe String
-&gt; Maybe Int
-&gt; Maybe Integer
-&gt; Integer
-&gt; (String, String)
</span><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-var">fmtu</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">16</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563319"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0X&quot;</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563324"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563327"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-590"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'b'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
-&gt; Maybe String
-&gt; Maybe Int
-&gt; Maybe Integer
-&gt; Integer
-&gt; (String, String)
</span><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-var">fmtu</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563319"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0b&quot;</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563324"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563327"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-591"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'o'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
-&gt; Maybe String
-&gt; Maybe Int
-&gt; Maybe Integer
-&gt; Integer
-&gt; (String, String)
</span><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-var">fmtu</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">8</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563319"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0&quot;</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563324"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563327"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-592"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'u'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
-&gt; Maybe String
-&gt; Maybe Int
-&gt; Maybe Integer
-&gt; Integer
-&gt; (String, String)
</span><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-var">fmtu</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563324"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563327"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-593"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'c'</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-594"></span><span>          </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#maxBound"><span class="hs-identifier hs-var">maxBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-595"></span><span>          </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var hs-var">fmtPrecision</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Maybe Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-596"></span><span>          </span><span class="annot"><span class="annottext">FieldFormat -&gt; String
</span><a href="Text.Printf.html#fmtModifiers"><span class="hs-identifier hs-var hs-var">fmtModifiers</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-597"></span><span>            </span><span class="annot"><span class="annottext">String -&gt; FieldFormatter
forall c. IsChar c =&gt; [c] -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatString"><span class="hs-identifier hs-var">formatString</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Char.html#chr"><span class="hs-identifier hs-var">chr</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; Int -&gt; Char
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563326"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">fmtChar :: Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var">fmtChar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'s'</span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-598"></span><span>    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'c'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. String -&gt; a
</span><a href="Text.Printf.html#perror"><span class="hs-identifier hs-var">perror</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;illegal char conversion&quot;</span></span><span>
</span><span id="line-599"></span><span>    </span><span id="local-6989586621679563313"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563313"><span class="hs-identifier hs-var">c</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. Char -&gt; a
</span><a href="Text.Printf.html#errorBadFormat"><span class="hs-identifier hs-var">errorBadFormat</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563313"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-600"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-601"></span><span>    </span><span id="local-6989586621679563323"><span class="annot"><span class="annottext">ufmt :: FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var hs-var">ufmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; FieldFormat -&gt; FieldFormat
</span><a href="Text.Printf.html#vFmt"><span class="hs-identifier hs-var">vFmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'d'</span></span><span> </span><span class="annot"><span class="annottext">(FieldFormat -&gt; FieldFormat) -&gt; FieldFormat -&gt; FieldFormat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563325"><span class="hs-identifier hs-var">ufmt0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-602"></span><span>      </span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">fmtPrecision :: FieldFormat -&gt; Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var">fmtPrecision</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fmtAdjust :: FieldFormat -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var">fmtAdjust</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatAdjustment
</span><a href="Text.Printf.html#ZeroPad"><span class="hs-identifier hs-var">ZeroPad</span></a></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-603"></span><span>        </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563325"><span class="hs-identifier hs-var">ufmt0</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">fmtAdjust :: Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var">fmtAdjust</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatAdjustment
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-604"></span><span>      </span><span class="annot"><span class="annottext">FieldFormat
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563325"><span class="hs-identifier hs-var">ufmt0</span></a></span><span>
</span><span id="line-605"></span><span>    </span><span id="local-6989586621679563319"><span class="annot"><span class="annottext">alt :: String -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563319"><span class="hs-identifier hs-var hs-var">alt</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-606"></span><span>    </span><span class="annot"><a href="#local-6989586621679563319"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span id="local-6989586621679563312"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563312"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Bool
</span><a href="Text.Printf.html#fmtAlternate"><span class="hs-identifier hs-var hs-var">fmtAlternate</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563323"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-607"></span><span>      </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563312"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-608"></span><span>      </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-609"></span><span>    </span><span id="local-6989586621679563318"><span class="annot"><span class="annottext">upcase :: (a, String) -&gt; (a, String)
</span><a href="#local-6989586621679563318"><span class="hs-identifier hs-var hs-var">upcase</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563311"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563311"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563310"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563310"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563311"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
</span><a href="GHC.Unicode.html#toUpper"><span class="hs-identifier hs-var">toUpper</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563310"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-610"></span><span>
</span><span id="line-611"></span><span class="hs-comment">-- | Formatter for 'RealFloat' values.</span><span>
</span><span id="line-612"></span><span class="hs-comment">--</span><span>
</span><span id="line-613"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-614"></span><span id="local-6989586621679563767"><span class="annot"><a href="Text.Printf.html#formatRealFloat"><span class="hs-identifier hs-type">formatRealFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563767"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563767"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-type">FieldFormatter</span></a></span></span><span>
</span><span id="line-615"></span><span id="formatRealFloat"><span class="annot"><span class="annottext">formatRealFloat :: forall a. RealFloat a =&gt; a -&gt; FieldFormatter
</span><a href="Text.Printf.html#formatRealFloat"><span class="hs-identifier hs-var hs-var">formatRealFloat</span></a></span></span><span> </span><span id="local-6989586621679563301"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563301"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679563300"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-616"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563299"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var hs-var">fmtChar</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldFormat -&gt; Char) -&gt; FieldFormat -&gt; Char
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; FieldFormat -&gt; FieldFormat
</span><a href="Text.Printf.html#vFmt"><span class="hs-identifier hs-var">vFmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'g'</span></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-617"></span><span>      </span><span id="local-6989586621679563298"><span class="annot"><span class="annottext">prec :: Maybe Int
</span><a href="#local-6989586621679563298"><span class="hs-identifier hs-var hs-var">prec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var hs-var">fmtPrecision</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-618"></span><span>      </span><span id="local-6989586621679563297"><span class="annot"><span class="annottext">alt :: Bool
</span><a href="#local-6989586621679563297"><span class="hs-identifier hs-var hs-var">alt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Bool
</span><a href="Text.Printf.html#fmtAlternate"><span class="hs-identifier hs-var hs-var">fmtAlternate</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span>
</span><span id="line-619"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-620"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-621"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'e'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
forall a.
RealFloat a =&gt;
Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
</span><a href="Text.Printf.html#dfmt"><span class="hs-identifier hs-var">dfmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563298"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563297"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563301"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-622"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'E'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
forall a.
RealFloat a =&gt;
Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
</span><a href="Text.Printf.html#dfmt"><span class="hs-identifier hs-var">dfmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563298"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563297"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563301"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-623"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'f'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
forall a.
RealFloat a =&gt;
Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
</span><a href="Text.Printf.html#dfmt"><span class="hs-identifier hs-var">dfmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563298"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563297"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563301"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-624"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'F'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
forall a.
RealFloat a =&gt;
Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
</span><a href="Text.Printf.html#dfmt"><span class="hs-identifier hs-var">dfmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563298"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563297"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563301"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-625"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'g'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
forall a.
RealFloat a =&gt;
Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
</span><a href="Text.Printf.html#dfmt"><span class="hs-identifier hs-var">dfmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563298"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563297"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563301"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-626"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'G'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563300"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
forall a.
RealFloat a =&gt;
Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
</span><a href="Text.Printf.html#dfmt"><span class="hs-identifier hs-var">dfmt</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563298"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563297"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563301"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-627"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. Char -&gt; a
</span><a href="Text.Printf.html#errorBadFormat"><span class="hs-identifier hs-var">errorBadFormat</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563299"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-628"></span><span>
</span><span id="line-629"></span><span class="hs-comment">-- This is the type carried around for arguments in</span><span>
</span><span id="line-630"></span><span class="hs-comment">-- the varargs code.</span><span>
</span><span id="line-631"></span><span class="hs-keyword">type</span><span> </span><span id="UPrintf"><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-var">UPrintf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#ModifierParser"><span class="hs-identifier hs-type">ModifierParser</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormatter"><span class="hs-identifier hs-type">FieldFormatter</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-632"></span><span>
</span><span id="line-633"></span><span class="hs-comment">-- Given a format string and a list of formatting functions</span><span>
</span><span id="line-634"></span><span class="hs-comment">-- (the actual argument value having already been baked into</span><span>
</span><span id="line-635"></span><span class="hs-comment">-- each of these functions before delivery), return the</span><span>
</span><span id="line-636"></span><span class="hs-comment">-- actual formatted text string.</span><span>
</span><span id="line-637"></span><span class="annot"><a href="Text.Printf.html#uprintf"><span class="hs-identifier hs-type">uprintf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-638"></span><span id="uprintf"><span class="annot"><span class="annottext">uprintf :: String -&gt; [UPrintf] -&gt; String
</span><a href="Text.Printf.html#uprintf"><span class="hs-identifier hs-var hs-var">uprintf</span></a></span></span><span> </span><span id="local-6989586621679563295"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563295"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679563294"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563294"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; String -&gt; String
</span><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563295"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563294"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-639"></span><span>
</span><span id="line-640"></span><span class="hs-comment">-- This function does the actual work, producing a ShowS</span><span>
</span><span id="line-641"></span><span class="hs-comment">-- instead of a string, for future expansion and for</span><span>
</span><span id="line-642"></span><span class="hs-comment">-- misguided efficiency.</span><span>
</span><span id="line-643"></span><span class="annot"><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-type">uprintfs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span><span>
</span><span id="line-644"></span><span id="uprintfs"><span class="annot"><span class="annottext">uprintfs :: String -&gt; [UPrintf] -&gt; String -&gt; String
</span><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var hs-var">uprintfs</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>       </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-645"></span><span class="annot"><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UPrintf
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">[UPrintf]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. a
</span><a href="Text.Printf.html#errorShortFormat"><span class="hs-identifier hs-var">errorShortFormat</span></a></span><span>
</span><span id="line-646"></span><span class="annot"><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'%'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'%'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679563291"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563291"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563290"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563290"><span class="hs-identifier hs-var">us</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'%'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; (String -&gt; String) -&gt; String -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; String -&gt; String
</span><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563291"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563290"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-647"></span><span class="annot"><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'%'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. a
</span><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-var">errorMissingArgument</span></a></span><span>
</span><span id="line-648"></span><span class="annot"><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'%'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679563289"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563289"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563288"><span class="annot"><span class="annottext">us :: [UPrintf]
</span><a href="#local-6989586621679563288"><span class="hs-identifier hs-var">us</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">UPrintf
</span><span class="hs-identifier">_</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">[UPrintf]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; String -&gt; String
</span><a href="Text.Printf.html#fmt"><span class="hs-identifier hs-var">fmt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563289"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563288"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-649"></span><span class="annot"><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563286"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563286"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679563285"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563285"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span>   </span><span id="local-6989586621679563284"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563284"><span class="hs-identifier hs-var">us</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563286"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; (String -&gt; String) -&gt; String -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; String -&gt; String
</span><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563285"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563284"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-650"></span><span>
</span><span id="line-651"></span><span class="hs-comment">-- Given a suffix of the format string starting just after</span><span>
</span><span id="line-652"></span><span class="hs-comment">-- the percent sign, and the list of remaining unprocessed</span><span>
</span><span id="line-653"></span><span class="hs-comment">-- arguments in the form described above, format the portion</span><span>
</span><span id="line-654"></span><span class="hs-comment">-- of the output described by this field description, and</span><span>
</span><span id="line-655"></span><span class="hs-comment">-- then continue with 'uprintfs'.</span><span>
</span><span id="line-656"></span><span class="annot"><a href="Text.Printf.html#fmt"><span class="hs-identifier hs-type">fmt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span><span>
</span><span id="line-657"></span><span id="fmt"><span class="annot"><span class="annottext">fmt :: String -&gt; [UPrintf] -&gt; String -&gt; String
</span><a href="Text.Printf.html#fmt"><span class="hs-identifier hs-var hs-var">fmt</span></a></span></span><span> </span><span id="local-6989586621679563283"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563283"><span class="hs-identifier hs-var">cs0</span></a></span></span><span> </span><span id="local-6989586621679563282"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563282"><span class="hs-identifier hs-var">us0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-658"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; Bool
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; [UPrintf]
-&gt; (FieldFormat, String, [UPrintf])
</span><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563283"><span class="hs-identifier hs-var">cs0</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563282"><span class="hs-identifier hs-var">us0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-659"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. a
</span><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-var">errorMissingArgument</span></a></span><span>
</span><span id="line-660"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679563280"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563280"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563279"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563279"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModifierParser
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563278"><span class="annot"><span class="annottext">FieldFormatter
</span><a href="#local-6989586621679563278"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563277"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563277"><span class="hs-identifier hs-var">us</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FieldFormatter
</span><a href="#local-6989586621679563278"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563280"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; (String -&gt; String) -&gt; String -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [UPrintf] -&gt; String -&gt; String
</span><a href="Text.Printf.html#uprintfs"><span class="hs-identifier hs-var">uprintfs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563279"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563277"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-661"></span><span>
</span><span id="line-662"></span><span class="hs-comment">-- Given field formatting information, and a tuple</span><span>
</span><span id="line-663"></span><span class="hs-comment">-- consisting of a prefix (for example, a minus sign) that</span><span>
</span><span id="line-664"></span><span class="hs-comment">-- is supposed to go before the argument value and a string</span><span>
</span><span id="line-665"></span><span class="hs-comment">-- representing the value, return the properly padded and</span><span>
</span><span id="line-666"></span><span class="hs-comment">-- formatted result.</span><span>
</span><span id="line-667"></span><span class="annot"><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-type">adjust</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-668"></span><span id="adjust"><span class="annot"><span class="annottext">adjust :: FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var hs-var">adjust</span></a></span></span><span> </span><span id="local-6989586621679563276"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563276"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563275"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563275"><span class="hs-identifier hs-var">pre</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563274"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563274"><span class="hs-identifier hs-var">str</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-669"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563273"><span class="annot"><span class="annottext">naturalWidth :: Int
</span><a href="#local-6989586621679563273"><span class="hs-identifier hs-var hs-var">naturalWidth</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563275"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563274"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-670"></span><span>      </span><span id="local-6989586621679563271"><span class="annot"><span class="annottext">zero :: Bool
</span><a href="#local-6989586621679563271"><span class="hs-identifier hs-var hs-var">zero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var hs-var">fmtAdjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563276"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-671"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatAdjustment
</span><a href="Text.Printf.html#ZeroPad"><span class="hs-identifier hs-var">ZeroPad</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-672"></span><span>        </span><span class="annot"><span class="annottext">Maybe FormatAdjustment
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-673"></span><span>      </span><span id="local-6989586621679563270"><span class="annot"><span class="annottext">left :: Bool
</span><a href="#local-6989586621679563270"><span class="hs-identifier hs-var hs-var">left</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var hs-var">fmtAdjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563276"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-674"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatAdjustment
</span><a href="Text.Printf.html#LeftAdjust"><span class="hs-identifier hs-var">LeftAdjust</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-675"></span><span>        </span><span class="annot"><span class="annottext">Maybe FormatAdjustment
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-676"></span><span>      </span><span id="local-6989586621679563269"><span class="annot"><span class="annottext">fill :: String
</span><a href="#local-6989586621679563269"><span class="hs-identifier hs-var hs-var">fill</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldFormat -&gt; Maybe Int
</span><a href="Text.Printf.html#fmtWidth"><span class="hs-identifier hs-var hs-var">fmtWidth</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563276"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-677"></span><span>        </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563268"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563268"><span class="hs-identifier hs-var">width</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563273"><span class="hs-identifier hs-var">naturalWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563268"><span class="hs-identifier hs-var">width</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-678"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563266"><span class="annot"><span class="annottext">fillchar :: Char
</span><a href="#local-6989586621679563266"><span class="hs-identifier hs-var hs-var">fillchar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563271"><span class="hs-identifier hs-var">zero</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-679"></span><span>          </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563268"><span class="hs-identifier hs-var">width</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563273"><span class="hs-identifier hs-var">naturalWidth</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563266"><span class="hs-identifier hs-var">fillchar</span></a></span><span>
</span><span id="line-680"></span><span>        </span><span class="annot"><span class="annottext">Maybe Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-681"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-682"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563270"><span class="hs-identifier hs-var">left</span></a></span><span>
</span><span id="line-683"></span><span>   </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563275"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563274"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563269"><span class="hs-identifier hs-var">fill</span></a></span><span>
</span><span id="line-684"></span><span>   </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563271"><span class="hs-identifier hs-var">zero</span></a></span><span>
</span><span id="line-685"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563275"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563269"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563274"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-686"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563269"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563275"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563274"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-687"></span><span>
</span><span id="line-688"></span><span class="hs-comment">-- For positive numbers with an explicit sign field (&quot;+&quot; or</span><span>
</span><span id="line-689"></span><span class="hs-comment">-- &quot; &quot;), adjust accordingly.</span><span>
</span><span id="line-690"></span><span class="annot"><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-type">adjustSigned</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-691"></span><span id="adjustSigned"><span class="annot"><span class="annottext">adjustSigned :: FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var hs-var">adjustSigned</span></a></span></span><span> </span><span id="local-6989586621679563264"><span class="annot"><span class="annottext">ufmt :: FieldFormat
</span><a href="#local-6989586621679563264"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">fmtSign :: FieldFormat -&gt; Maybe FormatSign
</span><a href="Text.Printf.html#fmtSign"><span class="hs-identifier hs-var">fmtSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatSign
</span><a href="Text.Printf.html#SignPlus"><span class="hs-identifier hs-var">SignPlus</span></a></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563263"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563263"><span class="hs-identifier hs-var">str</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-692"></span><span>  </span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563264"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;+&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563263"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-693"></span><span class="annot"><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span id="local-6989586621679563262"><span class="annot"><span class="annottext">ufmt :: FieldFormat
</span><a href="#local-6989586621679563262"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">fmtSign :: FieldFormat -&gt; Maybe FormatSign
</span><a href="Text.Printf.html#fmtSign"><span class="hs-identifier hs-var">fmtSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatSign
</span><a href="Text.Printf.html#SignSpace"><span class="hs-identifier hs-var">SignSpace</span></a></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563261"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563261"><span class="hs-identifier hs-var">str</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-694"></span><span>  </span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563262"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; &quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563261"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-695"></span><span class="annot"><a href="Text.Printf.html#adjustSigned"><span class="hs-identifier hs-var">adjustSigned</span></a></span><span> </span><span id="local-6989586621679563260"><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563260"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span> </span><span id="local-6989586621679563259"><span class="annot"><span class="annottext">(String, String)
</span><a href="#local-6989586621679563259"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-696"></span><span>  </span><span class="annot"><span class="annottext">FieldFormat -&gt; (String, String) -&gt; String
</span><a href="Text.Printf.html#adjust"><span class="hs-identifier hs-var">adjust</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563260"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">(String, String)
</span><a href="#local-6989586621679563259"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-697"></span><span>
</span><span id="line-698"></span><span class="hs-comment">-- Format a signed integer in the &quot;default&quot; fashion.</span><span>
</span><span id="line-699"></span><span class="hs-comment">-- This will be subjected to adjust subsequently.</span><span>
</span><span id="line-700"></span><span class="annot"><a href="Text.Printf.html#fmti"><span class="hs-identifier hs-type">fmti</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-701"></span><span id="fmti"><span class="annot"><span class="annottext">fmti :: Maybe Int -&gt; Integer -&gt; (String, String)
</span><a href="Text.Printf.html#fmti"><span class="hs-identifier hs-var hs-var">fmti</span></a></span></span><span> </span><span id="local-6989586621679563258"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563258"><span class="hs-identifier hs-var">prec</span></a></span></span><span> </span><span id="local-6989586621679563257"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563257"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-702"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563257"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; String -&gt; String
</span><a href="Text.Printf.html#integral_prec"><span class="hs-identifier hs-var">integral_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563258"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563257"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-703"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; String -&gt; String
</span><a href="Text.Printf.html#integral_prec"><span class="hs-identifier hs-var">integral_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563258"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563257"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-704"></span><span>
</span><span id="line-705"></span><span class="hs-comment">-- Format an unsigned integer in the &quot;default&quot; fashion.</span><span>
</span><span id="line-706"></span><span class="hs-comment">-- This will be subjected to adjust subsequently.  The 'b'</span><span>
</span><span id="line-707"></span><span class="hs-comment">-- argument is the base, the 'pre' argument is the prefix,</span><span>
</span><span id="line-708"></span><span class="hs-comment">-- and the '(Just m)' argument is the implicit lower-bound</span><span>
</span><span id="line-709"></span><span class="hs-comment">-- size of the operand for conversion from signed to</span><span>
</span><span id="line-710"></span><span class="hs-comment">-- unsigned. Thus, this function will refuse to convert an</span><span>
</span><span id="line-711"></span><span class="hs-comment">-- unbounded negative integer to an unsigned string.</span><span>
</span><span id="line-712"></span><span class="annot"><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-type">fmtu</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-713"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-714"></span><span id="fmtu"><span class="annot"><span class="annottext">fmtu :: Integer
-&gt; Maybe String
-&gt; Maybe Int
-&gt; Maybe Integer
-&gt; Integer
-&gt; (String, String)
</span><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-var hs-var">fmtu</span></a></span></span><span> </span><span id="local-6989586621679563254"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563254"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563253"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563253"><span class="hs-identifier hs-var">pre</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563252"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563252"><span class="hs-identifier hs-var">prec</span></a></span></span><span> </span><span id="local-6989586621679563251"><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563251"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679563250"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563250"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-715"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563249"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563249"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
-&gt; Maybe String
-&gt; Maybe Int
-&gt; Maybe Integer
-&gt; Integer
-&gt; (String, String)
</span><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-var">fmtu</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563254"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563252"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563251"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563250"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-716"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563253"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-717"></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563249"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-718"></span><span>      </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563249"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-719"></span><span>      </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563253"><span class="hs-identifier hs-var">pre</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563249"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-720"></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563253"><span class="hs-identifier hs-var">pre</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563249"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-721"></span><span class="annot"><a href="Text.Printf.html#fmtu"><span class="hs-identifier hs-var">fmtu</span></a></span><span> </span><span id="local-6989586621679563248"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563248"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span id="local-6989586621679563247"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563247"><span class="hs-identifier hs-var">prec0</span></a></span></span><span> </span><span id="local-6989586621679563246"><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563246"><span class="hs-identifier hs-var">m0</span></a></span></span><span> </span><span id="local-6989586621679563245"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563245"><span class="hs-identifier hs-var">i0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-722"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Maybe Integer -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563244"><span class="hs-identifier hs-var">fmtu'</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563247"><span class="hs-identifier hs-var">prec0</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679563246"><span class="hs-identifier hs-var">m0</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563245"><span class="hs-identifier hs-var">i0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-723"></span><span>    </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563243"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563243"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563243"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-724"></span><span>    </span><span class="annot"><span class="annottext">Maybe String
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(String, String)
forall a. a
</span><a href="Text.Printf.html#errorBadArgument"><span class="hs-identifier hs-var">errorBadArgument</span></a></span><span>
</span><span id="line-725"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-726"></span><span>    </span><span class="annot"><a href="#local-6989586621679563244"><span class="hs-identifier hs-type">fmtu'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-727"></span><span>    </span><span id="local-6989586621679563244"><span class="annot"><span class="annottext">fmtu' :: Maybe Int -&gt; Maybe Integer -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563244"><span class="hs-identifier hs-var hs-var">fmtu'</span></a></span></span><span> </span><span id="local-6989586621679563242"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563242"><span class="hs-identifier hs-var">prec</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563241"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563241"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563240"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563240"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563240"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-728"></span><span>      </span><span class="annot"><span class="annottext">Maybe Int -&gt; Maybe Integer -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563244"><span class="hs-identifier hs-var">fmtu'</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563242"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563241"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563240"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-729"></span><span>    </span><span class="annot"><a href="#local-6989586621679563244"><span class="hs-identifier hs-var">fmtu'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563238"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563238"><span class="hs-identifier hs-var">prec</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679563237"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563237"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563237"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-730"></span><span>      </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; Maybe String -&gt; Maybe String
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Int -&gt; String -&gt; String
</span><a href="Text.Printf.html#integral_prec"><span class="hs-identifier hs-var">integral_prec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563238"><span class="hs-identifier hs-var">prec</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe String -&gt; Maybe String) -&gt; Maybe String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Maybe Integer -&gt; Integer -&gt; Maybe String
</span><a href="#local-6989586621679563244"><span class="hs-identifier hs-var">fmtu'</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563237"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-731"></span><span>    </span><span class="annot"><a href="#local-6989586621679563244"><span class="hs-identifier hs-var">fmtu'</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679563236"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563236"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563236"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-732"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; (Int -&gt; Char) -&gt; Integer -&gt; String -&gt; String
forall a.
(Integral a, Show a) =&gt;
a -&gt; (Int -&gt; Char) -&gt; a -&gt; String -&gt; String
</span><a href="Numeric.html#showIntAtBase"><span class="hs-identifier hs-var">showIntAtBase</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563248"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Show.html#intToDigit"><span class="hs-identifier hs-var">intToDigit</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679563236"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-733"></span><span>    </span><span class="annot"><a href="#local-6989586621679563244"><span class="hs-identifier hs-var">fmtu'</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-734"></span><span>
</span><span id="line-735"></span><span>
</span><span id="line-736"></span><span class="hs-comment">-- This is used by 'fmtu' and 'fmti' to zero-pad an</span><span>
</span><span id="line-737"></span><span class="hs-comment">-- int-string to a required precision.</span><span>
</span><span id="line-738"></span><span class="annot"><a href="Text.Printf.html#integral_prec"><span class="hs-identifier hs-type">integral_prec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-739"></span><span id="integral_prec"><span class="annot"><span class="annottext">integral_prec :: Maybe Int -&gt; String -&gt; String
</span><a href="Text.Printf.html#integral_prec"><span class="hs-identifier hs-var hs-var">integral_prec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span id="local-6989586621679563233"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563233"><span class="hs-identifier hs-var">integral</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563233"><span class="hs-identifier hs-var">integral</span></a></span><span>
</span><span id="line-740"></span><span class="annot"><a href="Text.Printf.html#integral_prec"><span class="hs-identifier hs-var">integral_prec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-741"></span><span class="annot"><a href="Text.Printf.html#integral_prec"><span class="hs-identifier hs-var">integral_prec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563232"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563232"><span class="hs-identifier hs-var">prec</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563231"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563231"><span class="hs-identifier hs-var">integral</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-742"></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563232"><span class="hs-identifier hs-var">prec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563231"><span class="hs-identifier hs-var">integral</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563231"><span class="hs-identifier hs-var">integral</span></a></span><span>
</span><span id="line-743"></span><span>
</span><span id="line-744"></span><span class="annot"><a href="Text.Printf.html#stoi"><span class="hs-identifier hs-type">stoi</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-745"></span><span id="stoi"><span class="annot"><span class="annottext">stoi :: String -&gt; (Int, String)
</span><a href="Text.Printf.html#stoi"><span class="hs-identifier hs-var hs-var">stoi</span></a></span></span><span> </span><span id="local-6989586621679563229"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563229"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-746"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563228"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563228"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563227"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563227"><span class="hs-identifier hs-var">cs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isDigit"><span class="hs-identifier hs-var">isDigit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563229"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-747"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563228"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-748"></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563227"><span class="hs-identifier hs-var">cs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-749"></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Int
forall a. Read a =&gt; String -&gt; a
</span><a href="Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563228"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563227"><span class="hs-identifier hs-var">cs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-750"></span><span>
</span><span id="line-751"></span><span class="hs-comment">-- Figure out the FormatAdjustment, given:</span><span>
</span><span id="line-752"></span><span class="hs-comment">--   width, precision, left-adjust, zero-fill</span><span>
</span><span id="line-753"></span><span id="local-6989586621679563727"><span class="annot"><a href="Text.Printf.html#adjustment"><span class="hs-identifier hs-type">adjustment</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563727"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-754"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Text.Printf.html#FormatAdjustment"><span class="hs-identifier hs-type">FormatAdjustment</span></a></span></span><span>
</span><span id="line-755"></span><span id="adjustment"><span class="annot"><span class="annottext">adjustment :: forall a.
Maybe Int -&gt; Maybe a -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#adjustment"><span class="hs-identifier hs-var hs-var">adjustment</span></a></span></span><span> </span><span id="local-6989586621679563220"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563220"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679563219"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679563219"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679563218"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563218"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679563217"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563217"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-756"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563220"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-757"></span><span>    </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679563216"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563216"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563216"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
forall {p}. p -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
</span><a href="#local-6989586621679563215"><span class="hs-identifier hs-var">adjl</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679563219"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563217"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-758"></span><span>    </span><span class="annot"><span class="annottext">Maybe Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
forall {p}. p -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
</span><a href="#local-6989586621679563215"><span class="hs-identifier hs-var">adjl</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679563219"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563218"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563217"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-759"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-760"></span><span>    </span><span id="local-6989586621679563215"><span class="annot"><span class="annottext">adjl :: p -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
</span><a href="#local-6989586621679563215"><span class="hs-identifier hs-var hs-var">adjl</span></a></span></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FormatAdjustment -&gt; Maybe FormatAdjustment
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatAdjustment
</span><a href="Text.Printf.html#LeftAdjust"><span class="hs-identifier hs-var">LeftAdjust</span></a></span><span>
</span><span id="line-761"></span><span>    </span><span class="annot"><a href="#local-6989586621679563215"><span class="hs-identifier hs-var">adjl</span></a></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FormatAdjustment -&gt; Maybe FormatAdjustment
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatAdjustment
</span><a href="Text.Printf.html#ZeroPad"><span class="hs-identifier hs-var">ZeroPad</span></a></span><span>
</span><span id="line-762"></span><span>    </span><span class="annot"><a href="#local-6989586621679563215"><span class="hs-identifier hs-var">adjl</span></a></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatAdjustment
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-763"></span><span>
</span><span id="line-764"></span><span class="hs-comment">-- Parse the various format controls to get a format specification.</span><span>
</span><span id="line-765"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-type">getSpecs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Text.Printf.html#FormatSign"><span class="hs-identifier hs-type">FormatSign</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-766"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-767"></span><span id="getSpecs"><span class="annot"><span class="annottext">getSpecs :: Bool
-&gt; Bool
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; [UPrintf]
-&gt; (FieldFormat, String, [UPrintf])
</span><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var hs-var">getSpecs</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679563214"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563214"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679563213"><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563213"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679563212"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563212"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563211"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563211"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563210"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563210"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; Bool
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; [UPrintf]
-&gt; (FieldFormat, String, [UPrintf])
</span><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563214"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563213"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563212"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563211"><span class="hs-identifier hs-var">cs0</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563210"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-768"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span id="local-6989586621679563209"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563209"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679563208"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563208"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679563207"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563207"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'+'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563206"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563206"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563205"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563205"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; Bool
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; [UPrintf]
-&gt; (FieldFormat, String, [UPrintf])
</span><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563209"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563208"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FormatSign -&gt; Maybe FormatSign
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatSign
</span><a href="Text.Printf.html#SignPlus"><span class="hs-identifier hs-var">SignPlus</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563207"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563206"><span class="hs-identifier hs-var">cs0</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563205"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-769"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span id="local-6989586621679563204"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563204"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679563203"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563203"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679563202"><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563202"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679563201"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563201"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563200"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563200"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563199"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563199"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-770"></span><span>  </span><span class="annot"><span class="annottext">Bool
-&gt; Bool
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; [UPrintf]
-&gt; (FieldFormat, String, [UPrintf])
</span><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563204"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563203"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563198"><span class="hs-identifier hs-var">ss</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563201"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563200"><span class="hs-identifier hs-var">cs0</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563199"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-771"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-772"></span><span>    </span><span id="local-6989586621679563198"><span class="annot"><span class="annottext">ss :: Maybe FormatSign
</span><a href="#local-6989586621679563198"><span class="hs-identifier hs-var hs-var">ss</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563202"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-773"></span><span>      </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatSign
</span><a href="Text.Printf.html#SignPlus"><span class="hs-identifier hs-var">SignPlus</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatSign -&gt; Maybe FormatSign
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatSign
</span><a href="Text.Printf.html#SignPlus"><span class="hs-identifier hs-var">SignPlus</span></a></span><span>
</span><span id="line-774"></span><span>      </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatSign -&gt; Maybe FormatSign
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FormatSign
</span><a href="Text.Printf.html#SignSpace"><span class="hs-identifier hs-var">SignSpace</span></a></span><span>
</span><span id="line-775"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span id="local-6989586621679563197"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563197"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679563196"><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563196"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679563195"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563195"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563194"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563194"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563193"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563193"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; Bool
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; [UPrintf]
-&gt; (FieldFormat, String, [UPrintf])
</span><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563197"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563196"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563195"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563194"><span class="hs-identifier hs-var">cs0</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563193"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-776"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span id="local-6989586621679563192"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563192"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679563191"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563191"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679563190"><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563190"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'#'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563189"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563189"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563188"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563188"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; Bool
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; [UPrintf]
-&gt; (FieldFormat, String, [UPrintf])
</span><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563192"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563191"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563190"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563189"><span class="hs-identifier hs-var">cs0</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563188"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-777"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span id="local-6989586621679563187"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563187"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679563186"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563186"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679563185"><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563185"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679563184"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563184"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'*'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563183"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563183"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563182"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563182"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-778"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563181"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563181"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563180"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563180"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UPrintf] -&gt; ([UPrintf], Int)
</span><a href="Text.Printf.html#getStar"><span class="hs-identifier hs-var">getStar</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563182"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-779"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679563178"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563178"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563177"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563177"><span class="hs-identifier hs-var">cs''</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563176"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563176"><span class="hs-identifier hs-var">us''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563183"><span class="hs-identifier hs-var">cs0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-780"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'*'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679563175"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563175"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-781"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563174"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563174"><span class="hs-identifier hs-var">us'''</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563173"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563173"><span class="hs-identifier hs-var">p'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UPrintf] -&gt; ([UPrintf], Int)
</span><a href="Text.Printf.html#getStar"><span class="hs-identifier hs-var">getStar</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563181"><span class="hs-identifier hs-var">us'</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563173"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563175"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563174"><span class="hs-identifier hs-var">us'''</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-782"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679563172"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563172"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-783"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563171"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563171"><span class="hs-identifier hs-var">p'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563170"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563170"><span class="hs-identifier hs-var">r'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Int, String)
</span><a href="Text.Printf.html#stoi"><span class="hs-identifier hs-var">stoi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563172"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563171"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563170"><span class="hs-identifier hs-var">r'</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563181"><span class="hs-identifier hs-var">us'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-784"></span><span>        </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-785"></span><span>          </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563183"><span class="hs-identifier hs-var">cs0</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563181"><span class="hs-identifier hs-var">us'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-786"></span><span>      </span><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-type">FormatParse</span></a></span><span> </span><span id="local-6989586621679563169"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563169"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621679563168"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563168"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679563167"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563167"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-787"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563176"><span class="hs-identifier hs-var">us''</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-788"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679563166"><span class="annot"><span class="annottext">ModifierParser
</span><a href="#local-6989586621679563166"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FieldFormatter
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModifierParser
</span><a href="#local-6989586621679563166"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563177"><span class="hs-identifier hs-var">cs''</span></a></span><span>
</span><span id="line-789"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatParse
forall a. a
</span><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-var">errorMissingArgument</span></a></span><span>
</span><span id="line-790"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-791"></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat :: Maybe Int
-&gt; Maybe Int
-&gt; Maybe FormatAdjustment
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; Char
-&gt; FieldFormat
</span><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-792"></span><span>       </span><span class="annot"><span class="annottext">fmtWidth :: Maybe Int
</span><a href="Text.Printf.html#fmtWidth"><span class="hs-identifier hs-var">fmtWidth</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563180"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-793"></span><span>       </span><span class="annot"><span class="annottext">fmtPrecision :: Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var">fmtPrecision</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563178"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-794"></span><span>       </span><span class="annot"><span class="annottext">fmtAdjust :: Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var">fmtAdjust</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Maybe Int -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
forall a.
Maybe Int -&gt; Maybe a -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#adjustment"><span class="hs-identifier hs-var">adjustment</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563180"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563178"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563187"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563186"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-795"></span><span>       </span><span class="annot"><span class="annottext">fmtSign :: Maybe FormatSign
</span><a href="Text.Printf.html#fmtSign"><span class="hs-identifier hs-var">fmtSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563185"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-796"></span><span>       </span><span class="annot"><span class="annottext">fmtAlternate :: Bool
</span><a href="Text.Printf.html#fmtAlternate"><span class="hs-identifier hs-var">fmtAlternate</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563184"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-797"></span><span>       </span><span class="annot"><span class="annottext">fmtModifiers :: String
</span><a href="Text.Printf.html#fmtModifiers"><span class="hs-identifier hs-var">fmtModifiers</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563169"><span class="hs-identifier hs-var">ms</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-798"></span><span>       </span><span class="annot"><span class="annottext">fmtChar :: Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var">fmtChar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563168"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563167"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563176"><span class="hs-identifier hs-var">us''</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-799"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span id="local-6989586621679563164"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563164"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679563163"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563163"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679563162"><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563162"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679563161"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563161"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563160"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563160"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563159"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563159"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-800"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679563158"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563158"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563157"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563157"><span class="hs-identifier hs-var">cs'</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563156"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563156"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563160"><span class="hs-identifier hs-var">cs0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-801"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'*'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679563155"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563155"><span class="hs-identifier hs-var">cs''</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563154"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563154"><span class="hs-identifier hs-var">us''</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563153"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563153"><span class="hs-identifier hs-var">p'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UPrintf] -&gt; ([UPrintf], Int)
</span><a href="Text.Printf.html#getStar"><span class="hs-identifier hs-var">getStar</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563159"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563153"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563155"><span class="hs-identifier hs-var">cs''</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563154"><span class="hs-identifier hs-var">us''</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-802"></span><span>        </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; (Int, String)
</span><a href="Text.Printf.html#stoi"><span class="hs-identifier hs-var">stoi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563160"><span class="hs-identifier hs-var">cs0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563159"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-803"></span><span>      </span><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-type">FormatParse</span></a></span><span> </span><span id="local-6989586621679563152"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563152"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621679563151"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563151"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679563150"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563150"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-804"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563156"><span class="hs-identifier hs-var">us'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-805"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679563149"><span class="annot"><span class="annottext">ModifierParser
</span><a href="#local-6989586621679563149"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FieldFormatter
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModifierParser
</span><a href="#local-6989586621679563149"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563157"><span class="hs-identifier hs-var">cs'</span></a></span><span>
</span><span id="line-806"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatParse
forall a. a
</span><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-var">errorMissingArgument</span></a></span><span>
</span><span id="line-807"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-808"></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat :: Maybe Int
-&gt; Maybe Int
-&gt; Maybe FormatAdjustment
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; Char
-&gt; FieldFormat
</span><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-809"></span><span>       </span><span class="annot"><span class="annottext">fmtWidth :: Maybe Int
</span><a href="Text.Printf.html#fmtWidth"><span class="hs-identifier hs-var">fmtWidth</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-810"></span><span>       </span><span class="annot"><span class="annottext">fmtPrecision :: Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var">fmtPrecision</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563158"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-811"></span><span>       </span><span class="annot"><span class="annottext">fmtAdjust :: Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var">fmtAdjust</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Maybe Int -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
forall a.
Maybe Int -&gt; Maybe a -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#adjustment"><span class="hs-identifier hs-var">adjustment</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563158"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563164"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563163"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-812"></span><span>       </span><span class="annot"><span class="annottext">fmtSign :: Maybe FormatSign
</span><a href="Text.Printf.html#fmtSign"><span class="hs-identifier hs-var">fmtSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563162"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-813"></span><span>       </span><span class="annot"><span class="annottext">fmtAlternate :: Bool
</span><a href="Text.Printf.html#fmtAlternate"><span class="hs-identifier hs-var">fmtAlternate</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563161"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-814"></span><span>       </span><span class="annot"><span class="annottext">fmtModifiers :: String
</span><a href="Text.Printf.html#fmtModifiers"><span class="hs-identifier hs-var">fmtModifiers</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563152"><span class="hs-identifier hs-var">ms</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-815"></span><span>       </span><span class="annot"><span class="annottext">fmtChar :: Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var">fmtChar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563151"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563150"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563156"><span class="hs-identifier hs-var">us'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-816"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span id="local-6989586621679563148"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563148"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679563147"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563147"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679563146"><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563146"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679563145"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563145"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679563144"><span class="annot"><span class="annottext">cs0 :: String
</span><a href="#local-6989586621679563144"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679563143"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563143"><span class="hs-identifier hs-var">c0</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563142"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563142"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isDigit"><span class="hs-identifier hs-var">isDigit</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563143"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-817"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563141"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563141"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563140"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563140"><span class="hs-identifier hs-var">cs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Int, String)
</span><a href="Text.Printf.html#stoi"><span class="hs-identifier hs-var">stoi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563144"><span class="hs-identifier hs-var">cs0</span></a></span><span>
</span><span id="line-818"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679563139"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563139"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563138"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563138"><span class="hs-identifier hs-var">cs''</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563137"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563137"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563140"><span class="hs-identifier hs-var">cs'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-819"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'*'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563136"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563136"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-820"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563135"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563135"><span class="hs-identifier hs-var">us''</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563134"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563134"><span class="hs-identifier hs-var">p'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UPrintf] -&gt; ([UPrintf], Int)
</span><a href="Text.Printf.html#getStar"><span class="hs-identifier hs-var">getStar</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563142"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563134"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563136"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563135"><span class="hs-identifier hs-var">us''</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-821"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563133"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563133"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-822"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679563132"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563132"><span class="hs-identifier hs-var">p'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563131"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563131"><span class="hs-identifier hs-var">r'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Int, String)
</span><a href="Text.Printf.html#stoi"><span class="hs-identifier hs-var">stoi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563133"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563132"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563131"><span class="hs-identifier hs-var">r'</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563142"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-823"></span><span>        </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-824"></span><span>          </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563140"><span class="hs-identifier hs-var">cs'</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563142"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-825"></span><span>      </span><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-type">FormatParse</span></a></span><span> </span><span id="local-6989586621679563130"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563130"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621679563129"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563129"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679563128"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563128"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-826"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563137"><span class="hs-identifier hs-var">us'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-827"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679563127"><span class="annot"><span class="annottext">ModifierParser
</span><a href="#local-6989586621679563127"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FieldFormatter
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModifierParser
</span><a href="#local-6989586621679563127"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563138"><span class="hs-identifier hs-var">cs''</span></a></span><span>
</span><span id="line-828"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatParse
forall a. a
</span><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-var">errorMissingArgument</span></a></span><span>
</span><span id="line-829"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-830"></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat :: Maybe Int
-&gt; Maybe Int
-&gt; Maybe FormatAdjustment
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; Char
-&gt; FieldFormat
</span><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-831"></span><span>       </span><span class="annot"><span class="annottext">fmtWidth :: Maybe Int
</span><a href="Text.Printf.html#fmtWidth"><span class="hs-identifier hs-var">fmtWidth</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563141"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-832"></span><span>       </span><span class="annot"><span class="annottext">fmtPrecision :: Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var">fmtPrecision</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563139"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-833"></span><span>       </span><span class="annot"><span class="annottext">fmtAdjust :: Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var">fmtAdjust</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Maybe Int -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
forall a.
Maybe Int -&gt; Maybe a -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#adjustment"><span class="hs-identifier hs-var">adjustment</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679563141"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563139"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563148"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563147"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-834"></span><span>       </span><span class="annot"><span class="annottext">fmtSign :: Maybe FormatSign
</span><a href="Text.Printf.html#fmtSign"><span class="hs-identifier hs-var">fmtSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563146"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-835"></span><span>       </span><span class="annot"><span class="annottext">fmtAlternate :: Bool
</span><a href="Text.Printf.html#fmtAlternate"><span class="hs-identifier hs-var">fmtAlternate</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563145"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-836"></span><span>       </span><span class="annot"><span class="annottext">fmtModifiers :: String
</span><a href="Text.Printf.html#fmtModifiers"><span class="hs-identifier hs-var">fmtModifiers</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563130"><span class="hs-identifier hs-var">ms</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-837"></span><span>       </span><span class="annot"><span class="annottext">fmtChar :: Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var">fmtChar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563129"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563128"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563137"><span class="hs-identifier hs-var">us'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-838"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span id="local-6989586621679563126"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563126"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679563125"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563125"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679563124"><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563124"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679563123"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563123"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679563122"><span class="annot"><span class="annottext">cs0 :: String
</span><a href="#local-6989586621679563122"><span class="hs-identifier hs-var">cs0</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679563121"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563121"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-839"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="Text.Printf.html#FormatParse"><span class="hs-identifier hs-type">FormatParse</span></a></span><span> </span><span id="local-6989586621679563120"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563120"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621679563119"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563119"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679563118"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563118"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-840"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563121"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-841"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679563117"><span class="annot"><span class="annottext">ModifierParser
</span><a href="#local-6989586621679563117"><span class="hs-identifier hs-var">ufmt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FieldFormatter
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModifierParser
</span><a href="#local-6989586621679563117"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563122"><span class="hs-identifier hs-var">cs0</span></a></span><span>
</span><span id="line-842"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FormatParse
forall a. a
</span><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-var">errorMissingArgument</span></a></span><span>
</span><span id="line-843"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-844"></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormat :: Maybe Int
-&gt; Maybe Int
-&gt; Maybe FormatAdjustment
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; Char
-&gt; FieldFormat
</span><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-845"></span><span>       </span><span class="annot"><span class="annottext">fmtWidth :: Maybe Int
</span><a href="Text.Printf.html#fmtWidth"><span class="hs-identifier hs-var">fmtWidth</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-846"></span><span>       </span><span class="annot"><span class="annottext">fmtPrecision :: Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var">fmtPrecision</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-847"></span><span>       </span><span class="annot"><span class="annottext">fmtAdjust :: Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var">fmtAdjust</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Maybe Any -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
forall a.
Maybe Int -&gt; Maybe a -&gt; Bool -&gt; Bool -&gt; Maybe FormatAdjustment
</span><a href="Text.Printf.html#adjustment"><span class="hs-identifier hs-var">adjustment</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Any
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563126"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563125"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-848"></span><span>       </span><span class="annot"><span class="annottext">fmtSign :: Maybe FormatSign
</span><a href="Text.Printf.html#fmtSign"><span class="hs-identifier hs-var">fmtSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><a href="#local-6989586621679563124"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-849"></span><span>       </span><span class="annot"><span class="annottext">fmtAlternate :: Bool
</span><a href="Text.Printf.html#fmtAlternate"><span class="hs-identifier hs-var">fmtAlternate</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563123"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-850"></span><span>       </span><span class="annot"><span class="annottext">fmtModifiers :: String
</span><a href="Text.Printf.html#fmtModifiers"><span class="hs-identifier hs-var">fmtModifiers</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563120"><span class="hs-identifier hs-var">ms</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-851"></span><span>       </span><span class="annot"><span class="annottext">fmtChar :: Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var">fmtChar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563119"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563118"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563121"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-852"></span><span class="annot"><a href="Text.Printf.html#getSpecs"><span class="hs-identifier hs-var">getSpecs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>       </span><span class="annot"><span class="annottext">[UPrintf]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span>
</span><span id="line-853"></span><span>  </span><span class="annot"><span class="annottext">(FieldFormat, String, [UPrintf])
forall a. a
</span><a href="Text.Printf.html#errorShortFormat"><span class="hs-identifier hs-var">errorShortFormat</span></a></span><span>
</span><span id="line-854"></span><span>
</span><span id="line-855"></span><span class="hs-comment">-- Process a star argument in a format specification.</span><span>
</span><span id="line-856"></span><span class="annot"><a href="Text.Printf.html#getStar"><span class="hs-identifier hs-type">getStar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="Text.Printf.html#UPrintf"><span class="hs-identifier hs-type">UPrintf</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-857"></span><span id="getStar"><span class="annot"><span class="annottext">getStar :: [UPrintf] -&gt; ([UPrintf], Int)
</span><a href="Text.Printf.html#getStar"><span class="hs-identifier hs-var hs-var">getStar</span></a></span></span><span> </span><span id="local-6989586621679563116"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563116"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-858"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563115"><span class="annot"><span class="annottext">ufmt :: FieldFormat
</span><a href="#local-6989586621679563115"><span class="hs-identifier hs-var hs-var">ufmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldFormat :: Maybe Int
-&gt; Maybe Int
-&gt; Maybe FormatAdjustment
-&gt; Maybe FormatSign
-&gt; Bool
-&gt; String
-&gt; Char
-&gt; FieldFormat
</span><a href="Text.Printf.html#FieldFormat"><span class="hs-identifier hs-type">FieldFormat</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-859"></span><span>        </span><span class="annot"><span class="annottext">fmtWidth :: Maybe Int
</span><a href="Text.Printf.html#fmtWidth"><span class="hs-identifier hs-var">fmtWidth</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-860"></span><span>        </span><span class="annot"><span class="annottext">fmtPrecision :: Maybe Int
</span><a href="Text.Printf.html#fmtPrecision"><span class="hs-identifier hs-var">fmtPrecision</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-861"></span><span>        </span><span class="annot"><span class="annottext">fmtAdjust :: Maybe FormatAdjustment
</span><a href="Text.Printf.html#fmtAdjust"><span class="hs-identifier hs-var">fmtAdjust</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatAdjustment
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-862"></span><span>        </span><span class="annot"><span class="annottext">fmtSign :: Maybe FormatSign
</span><a href="Text.Printf.html#fmtSign"><span class="hs-identifier hs-var">fmtSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FormatSign
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-863"></span><span>        </span><span class="annot"><span class="annottext">fmtAlternate :: Bool
</span><a href="Text.Printf.html#fmtAlternate"><span class="hs-identifier hs-var">fmtAlternate</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-864"></span><span>        </span><span class="annot"><span class="annottext">fmtModifiers :: String
</span><a href="Text.Printf.html#fmtModifiers"><span class="hs-identifier hs-var">fmtModifiers</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-865"></span><span>        </span><span class="annot"><span class="annottext">fmtChar :: Char
</span><a href="Text.Printf.html#fmtChar"><span class="hs-identifier hs-var">fmtChar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'d'</span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-866"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563116"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-867"></span><span>    </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">([UPrintf], Int)
forall a. a
</span><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-var">errorMissingArgument</span></a></span><span>
</span><span id="line-868"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModifierParser
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679563114"><span class="annot"><span class="annottext">FieldFormatter
</span><a href="#local-6989586621679563114"><span class="hs-identifier hs-var">nu</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563113"><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563113"><span class="hs-identifier hs-var">us'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[UPrintf]
</span><a href="#local-6989586621679563113"><span class="hs-identifier hs-var">us'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall a. Read a =&gt; String -&gt; a
</span><a href="Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldFormatter
</span><a href="#local-6989586621679563114"><span class="hs-identifier hs-var">nu</span></a></span><span> </span><span class="annot"><span class="annottext">FieldFormat
</span><a href="#local-6989586621679563115"><span class="hs-identifier hs-var">ufmt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-869"></span><span>
</span><span id="line-870"></span><span class="hs-comment">-- Format a RealFloat value.</span><span>
</span><span id="line-871"></span><span id="local-6989586621679563738"><span class="annot"><a href="Text.Printf.html#dfmt"><span class="hs-identifier hs-type">dfmt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679563738"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563738"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-872"></span><span id="dfmt"><span class="annot"><span class="annottext">dfmt :: forall a.
RealFloat a =&gt;
Char -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; (String, String)
</span><a href="Text.Printf.html#dfmt"><span class="hs-identifier hs-var hs-var">dfmt</span></a></span></span><span> </span><span id="local-6989586621679563106"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563106"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679563105"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563105"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679563104"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563104"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679563103"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563103"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-873"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679563102"><span class="annot"><span class="annottext">caseConvert :: String -&gt; String
</span><a href="#local-6989586621679563102"><span class="hs-identifier hs-var hs-var">caseConvert</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isUpper"><span class="hs-identifier hs-var">isUpper</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563106"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
</span><a href="GHC.Unicode.html#toUpper"><span class="hs-identifier hs-var">toUpper</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-874"></span><span>      </span><span id="local-6989586621679563100"><span class="annot"><span class="annottext">showFunction :: Maybe Int -&gt; a -&gt; String -&gt; String
</span><a href="#local-6989586621679563100"><span class="hs-identifier hs-var hs-var">showFunction</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
</span><a href="GHC.Unicode.html#toLower"><span class="hs-identifier hs-var">toLower</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563106"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-875"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'e'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; a -&gt; String -&gt; String
forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; String -&gt; String
</span><a href="Numeric.html#showEFloat"><span class="hs-identifier hs-var">showEFloat</span></a></span><span>
</span><span id="line-876"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'f'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563104"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; a -&gt; String -&gt; String
forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; String -&gt; String
</span><a href="Numeric.html#showFFloatAlt"><span class="hs-identifier hs-var">showFFloatAlt</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; a -&gt; String -&gt; String
forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; String -&gt; String
</span><a href="Numeric.html#showFFloat"><span class="hs-identifier hs-var">showFFloat</span></a></span><span>
</span><span id="line-877"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'g'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679563104"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; a -&gt; String -&gt; String
forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; String -&gt; String
</span><a href="Numeric.html#showGFloatAlt"><span class="hs-identifier hs-var">showGFloatAlt</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; a -&gt; String -&gt; String
forall a. RealFloat a =&gt; Maybe Int -&gt; a -&gt; String -&gt; String
</span><a href="Numeric.html#showGFloat"><span class="hs-identifier hs-var">showGFloat</span></a></span><span>
</span><span id="line-878"></span><span>        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe Int -&gt; a -&gt; String -&gt; String
forall a. String -&gt; a
</span><a href="Text.Printf.html#perror"><span class="hs-identifier hs-var">perror</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;internal error: impossible dfmt&quot;</span></span><span>
</span><span id="line-879"></span><span>      </span><span id="local-6989586621679563093"><span class="annot"><span class="annottext">result :: String
</span><a href="#local-6989586621679563093"><span class="hs-identifier hs-var hs-var">result</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679563102"><span class="hs-identifier hs-var">caseConvert</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; a -&gt; String -&gt; String
</span><a href="#local-6989586621679563100"><span class="hs-identifier hs-var">showFunction</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679563105"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679563103"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-880"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-881"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563093"><span class="hs-identifier hs-var">result</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-882"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679563092"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563092"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563092"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-883"></span><span>     </span><span id="local-6989586621679563091"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563091"><span class="hs-identifier hs-var">cs</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563091"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-884"></span><span>
</span><span id="line-885"></span><span>
</span><span id="line-886"></span><span class="hs-comment">-- | Raises an 'error' with a printf-specific prefix on the</span><span>
</span><span id="line-887"></span><span class="hs-comment">-- message string.</span><span>
</span><span id="line-888"></span><span class="hs-comment">--</span><span>
</span><span id="line-889"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-890"></span><span id="local-6989586621679563746"><span class="annot"><a href="Text.Printf.html#perror"><span class="hs-identifier hs-type">perror</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563746"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-891"></span><span id="perror"><span class="annot"><span class="annottext">perror :: forall a. String -&gt; a
</span><a href="Text.Printf.html#perror"><span class="hs-identifier hs-var hs-var">perror</span></a></span></span><span> </span><span id="local-6989586621679563090"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563090"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; a) -&gt; String -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;printf: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679563090"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-892"></span><span>
</span><span id="line-893"></span><span class="hs-comment">-- | Calls 'perror' to indicate an unknown format letter for</span><span>
</span><span id="line-894"></span><span class="hs-comment">-- a given type.</span><span>
</span><span id="line-895"></span><span class="hs-comment">--</span><span>
</span><span id="line-896"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-897"></span><span id="local-6989586621679563749"><span class="annot"><a href="Text.Printf.html#errorBadFormat"><span class="hs-identifier hs-type">errorBadFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679563749"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-898"></span><span id="errorBadFormat"><span class="annot"><span class="annottext">errorBadFormat :: forall a. Char -&gt; a
</span><a href="Text.Printf.html#errorBadFormat"><span class="hs-identifier hs-var hs-var">errorBadFormat</span></a></span></span><span> </span><span id="local-6989586621679563086"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563086"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="Text.Printf.html#perror"><span class="hs-identifier hs-var">perror</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; a) -&gt; String -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bad formatting char &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679563086"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-899"></span><span>
</span><span id="line-900"></span><span id="local-6989586621679563778"><span class="annot"><a href="Text.Printf.html#errorShortFormat"><span class="hs-identifier hs-type">errorShortFormat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-type">errorMissingArgument</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Printf.html#errorBadArgument"><span class="hs-identifier hs-type">errorBadArgument</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679563778"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-901"></span><span class="hs-comment">-- | Calls 'perror' to indicate that the format string ended</span><span>
</span><span id="line-902"></span><span class="hs-comment">-- early.</span><span>
</span><span id="line-903"></span><span class="hs-comment">--</span><span>
</span><span id="line-904"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-905"></span><span id="errorShortFormat"><span class="annot"><span class="annottext">errorShortFormat :: forall a. a
</span><a href="Text.Printf.html#errorShortFormat"><span class="hs-identifier hs-var hs-var">errorShortFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="Text.Printf.html#perror"><span class="hs-identifier hs-var">perror</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;formatting string ended prematurely&quot;</span></span><span>
</span><span id="line-906"></span><span class="hs-comment">-- | Calls 'perror' to indicate that there is a missing</span><span>
</span><span id="line-907"></span><span class="hs-comment">-- argument in the argument list.</span><span>
</span><span id="line-908"></span><span class="hs-comment">--</span><span>
</span><span id="line-909"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-910"></span><span id="errorMissingArgument"><span class="annot"><span class="annottext">errorMissingArgument :: forall a. a
</span><a href="Text.Printf.html#errorMissingArgument"><span class="hs-identifier hs-var hs-var">errorMissingArgument</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="Text.Printf.html#perror"><span class="hs-identifier hs-var">perror</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;argument list ended prematurely&quot;</span></span><span>
</span><span id="line-911"></span><span class="hs-comment">-- | Calls 'perror' to indicate that there is a type</span><span>
</span><span id="line-912"></span><span class="hs-comment">-- error or similar in the given argument.</span><span>
</span><span id="line-913"></span><span class="hs-comment">--</span><span>
</span><span id="line-914"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-915"></span><span id="errorBadArgument"><span class="annot"><span class="annottext">errorBadArgument :: forall a. a
</span><a href="Text.Printf.html#errorBadArgument"><span class="hs-identifier hs-var hs-var">errorBadArgument</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="Text.Printf.html#perror"><span class="hs-identifier hs-var">perror</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bad argument&quot;</span></span><span>
</span><span id="line-916"></span></pre></body></html>